Commit | Line | Data |
---|---|---|
ce9cf64b RW |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> | |
464f5447 | 3 | ;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> |
37a57196 | 4 | ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at> |
17e1e216 | 5 | ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org> |
c452860e | 6 | ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
121d9d1a | 7 | ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com> |
5543d3bb | 8 | ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net> |
641b9c51 | 9 | ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com> |
ce9cf64b RW |
10 | ;;; |
11 | ;;; This file is part of GNU Guix. | |
12 | ;;; | |
13 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
14 | ;;; under the terms of the GNU General Public License as published by | |
15 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
16 | ;;; your option) any later version. | |
17 | ;;; | |
18 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
19 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
20 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
21 | ;;; GNU General Public License for more details. | |
22 | ;;; | |
23 | ;;; You should have received a copy of the GNU General Public License | |
24 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
25 | ||
26 | (define-module (gnu packages logging) | |
27 | #:use-module ((guix licenses) #:prefix license:) | |
28 | #:use-module (guix packages) | |
29 | #:use-module (guix utils) | |
30 | #:use-module (guix download) | |
53d159f8 | 31 | #:use-module (guix git-download) |
121d9d1a | 32 | #:use-module (guix build-system cmake) |
ce9cf64b | 33 | #:use-module (guix build-system gnu) |
99aa2dce | 34 | #:use-module (guix build-system python) |
b7506f74 | 35 | #:use-module (gnu packages) |
37a57196 | 36 | #:use-module (gnu packages ncurses) |
53d159f8 | 37 | #:use-module (gnu packages perl) |
99aa2dce | 38 | #:use-module (gnu packages python) |
1b2f753d | 39 | #:use-module (gnu packages python-web) |
44d10b1f | 40 | #:use-module (gnu packages python-xyz) |
53d159f8 | 41 | #:use-module (gnu packages autotools)) |
ce9cf64b RW |
42 | |
43 | (define-public log4cpp | |
44 | (package | |
45 | (name "log4cpp") | |
bc6ca523 | 46 | (version "1.1.3") |
ce9cf64b RW |
47 | (source (origin |
48 | (method url-fetch) | |
49 | (uri (string-append "mirror://sourceforge/log4cpp/log4cpp-" | |
50 | (version-major+minor version) ".x%20%28new%29" | |
51 | "/log4cpp-" (version-major+minor version) | |
52 | "/log4cpp-" version ".tar.gz")) | |
53 | (sha256 | |
54 | (base32 | |
bc6ca523 | 55 | "07gmr3jyaf2239n9sp6h7hwdz1pv7b7aka8n06gmr2fnlmaymfrc")))) |
ce9cf64b | 56 | (build-system gnu-build-system) |
641b9c51 MB |
57 | (arguments |
58 | '(#:phases | |
59 | (modify-phases %standard-phases | |
60 | (add-after 'unpack 'do-not-call-stime | |
61 | (lambda _ | |
62 | ;; Patch out use of 'stime' which was removed from glibc 2.31. | |
63 | ;; The test would not work in the build container anyway. | |
64 | (substitute* "tests/testDailyRollingFileAppender.cpp" | |
65 | (("if \\(stime\\(&now\\) == -1\\)") | |
66 | "if (1)")) | |
67 | #t))))) | |
ce9cf64b RW |
68 | (synopsis "Log library for C++") |
69 | (description | |
70 | "Log4cpp is library of C++ classes for flexible logging to files, syslog, | |
71 | IDSA and other destinations. It is modeled after the Log4j Java library, | |
72 | staying as close to their API as is reasonable.") | |
73 | (home-page "http://log4cpp.sourceforge.net/") | |
74 | (license license:lgpl2.1+))) | |
53d159f8 LC |
75 | |
76 | (define-public glog | |
77 | (package | |
78 | (name "glog") | |
4678cc46 | 79 | (version "0.4.0") |
53d159f8 LC |
80 | (home-page "https://github.com/google/glog") |
81 | (source (origin | |
4678cc46 MB |
82 | (method git-fetch) |
83 | (uri (git-reference (url home-page) | |
84 | (commit (string-append "v" version)))) | |
53d159f8 LC |
85 | (sha256 |
86 | (base32 | |
4678cc46 MB |
87 | "1xd3maiipfbxmhc9rrblc5x52nxvkwxp14npg31y5njqvkvzax9b")) |
88 | (file-name (git-file-name name version)))) | |
53d159f8 | 89 | (build-system gnu-build-system) |
dd9560a0 MB |
90 | (arguments |
91 | `(#:phases (modify-phases %standard-phases | |
92 | (add-before 'check 'disable-signal-tests | |
93 | (lambda _ | |
94 | ;; XXX: This test fails on non x86_64. See e.g. | |
95 | ;; https://github.com/google/glog/issues/219 and | |
96 | ;; https://github.com/google/glog/issues/256. | |
97 | (substitute* "Makefile" | |
98 | (("\tsignalhandler_unittest_sh") "\t$(EMPTY)")) | |
99 | #t))))) | |
53d159f8 LC |
100 | (native-inputs |
101 | `(("perl" ,perl) ;for tests | |
464f5447 | 102 | ("autoconf" ,autoconf-wrapper) |
53d159f8 LC |
103 | ("automake" ,automake) |
104 | ("libtool" ,libtool))) | |
53d159f8 LC |
105 | (synopsis "C++ logging library") |
106 | (description | |
107 | "Google glog is a library that implements application-level logging. | |
108 | This library provides logging APIs based on C++-style streams and various | |
109 | helper macros. You can log a message by simply streaming things to log at a | |
110 | particular severity level. It allows logging to be controlled from the | |
111 | command line.") | |
112 | (license license:bsd-3))) | |
99aa2dce CB |
113 | |
114 | (define-public tailon | |
115 | (package | |
116 | (name "tailon") | |
761f5865 | 117 | (version "1.3.0") |
99aa2dce CB |
118 | (source |
119 | (origin | |
120 | (method url-fetch) | |
121 | (uri (pypi-uri name version)) | |
122 | (sha256 | |
123 | (base32 | |
761f5865 | 124 | "0wl2wm6p3pc0vkk33s7rzgcfvs9cwxfmlz997pdfhlw72r00l7s5")))) |
99aa2dce CB |
125 | (build-system python-build-system) |
126 | (inputs | |
127 | `(("python-pyyaml" ,python-pyyaml) | |
128 | ("python-sockjs-tornado" ,python-sockjs-tornado) | |
761f5865 | 129 | ("python-tornado-http-auth" ,python-tornado-http-auth) |
99aa2dce | 130 | ("python-tornado" ,python-tornado))) |
872a6fd9 CB |
131 | (arguments |
132 | `(#:phases | |
133 | (modify-phases %standard-phases | |
134 | (add-after 'unpack 'patch-commands.py | |
135 | (lambda args | |
136 | (substitute* "tailon/commands.py" | |
137 | (("self\\.first_in_path\\('grep'\\)") | |
138 | (string-append"'" (which "grep") "'")) | |
139 | (("self\\.first_in_path\\('gawk', 'awk'\\)") | |
140 | (string-append"'" (which "gawk") "'")) | |
141 | (("self\\.first_in_path\\('gsed', 'sed'\\)") | |
142 | (string-append"'" (which "sed") "'")) | |
143 | (("self\\.first_in_path\\('gtail', 'tail'\\)") | |
144 | (string-append"'" (which "tail") "'"))) | |
145 | #t))))) | |
99aa2dce CB |
146 | (home-page "https://tailon.readthedocs.io/") |
147 | (synopsis | |
148 | "Webapp for looking at and searching through log files") | |
149 | (description | |
150 | "Tailon provides a web interface around the tail, grep, awk and sed | |
151 | commands, displaying the results via a web interface.") | |
152 | (license license:bsd-3))) | |
37a57196 SR |
153 | |
154 | (define-public multitail | |
155 | (package | |
156 | (name "multitail") | |
c452860e | 157 | (version "6.5.0") |
37a57196 SR |
158 | (source |
159 | (origin | |
160 | (method url-fetch) | |
161 | (uri (string-append "https://vanheusden.com/multitail/multitail-" | |
162 | version ".tgz")) | |
163 | (sha256 | |
c452860e | 164 | (base32 "1vd9vdxyxsccl64ilx542ya5vlw2bpg6gnkq1x8cfqy6vxvmx7dj")))) |
37a57196 SR |
165 | (build-system gnu-build-system) |
166 | (arguments | |
167 | `(#:make-flags | |
168 | (list "CC=gcc" | |
169 | "PREFIX=" | |
170 | (string-append "DESTDIR=" | |
171 | (assoc-ref %outputs "out"))) | |
172 | #:phases | |
173 | (modify-phases %standard-phases | |
174 | (add-after 'unpack 'patch-curses-lib | |
175 | (lambda* (#:key outputs #:allow-other-keys) | |
176 | (let ((out (assoc-ref outputs "out"))) | |
177 | (substitute* "mt.h" | |
178 | (("ncursesw\\/panel.h") "panel.h") | |
179 | (("ncursesw\\/ncurses.h") "ncurses.h"))) | |
180 | #t)) | |
181 | (delete 'configure)) | |
182 | #:tests? #f)) ; no test suite (make check just runs cppcheck) | |
183 | (inputs `(("ncurses" ,ncurses))) | |
184 | (home-page "https://vanheusden.com/multitail/") | |
185 | (synopsis "Monitor multiple logfiles") | |
186 | (description | |
187 | "MultiTail allows you to monitor logfiles and command output in multiple | |
188 | windows in a terminal, colorize, filter and merge.") | |
189 | (license license:gpl2+))) | |
121d9d1a GB |
190 | |
191 | (define-public spdlog | |
192 | (package | |
193 | (name "spdlog") | |
5ea20584 | 194 | (version "1.5.0") |
121d9d1a GB |
195 | (source |
196 | (origin | |
197 | (method git-fetch) | |
198 | (uri (git-reference | |
199 | (url "https://github.com/gabime/spdlog.git") | |
200 | (commit (string-append "v" version)))) | |
f1d4d79f | 201 | (file-name (git-file-name name version)) |
121d9d1a GB |
202 | (sha256 |
203 | (base32 | |
5ea20584 | 204 | "0dn44r3xbw1w0bk9yflnxkh3rzdq2bpxkks44skfmqig0rsj1f1x")))) |
121d9d1a GB |
205 | (build-system cmake-build-system) |
206 | ;; TODO run benchmark. Currently not possible, as adding | |
207 | ;; (gnu packages benchmark) forms a dependency cycle | |
208 | (arguments | |
209 | '(#:configure-flags | |
210 | (list "-DSPDLOG_BUILD_BENCH=OFF"))) | |
211 | (home-page "https://github.com/gabime/spdlog") | |
212 | (synopsis "Fast C++ logging library") | |
5543d3bb MP |
213 | (description "Spdlog is a very fast header-only/compiled C++ logging |
214 | library.") | |
215 | ;; spdlog is under Expat license, but the bundled fmt library in | |
216 | ;; "include/spdlog/fmt/bundled" is under BSD 2 clause license. | |
217 | (license (list license:expat license:bsd-2)))) |