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> |
fa924a97 | 6 | ;;; Copyright © 2018–2022 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> |
722c1799 | 10 | ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net> |
ce9cf64b RW |
11 | ;;; |
12 | ;;; This file is part of GNU Guix. | |
13 | ;;; | |
14 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
15 | ;;; under the terms of the GNU General Public License as published by | |
16 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
17 | ;;; your option) any later version. | |
18 | ;;; | |
19 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
20 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
21 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
22 | ;;; GNU General Public License for more details. | |
23 | ;;; | |
24 | ;;; You should have received a copy of the GNU General Public License | |
25 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
26 | ||
27 | (define-module (gnu packages logging) | |
28 | #:use-module ((guix licenses) #:prefix license:) | |
29 | #:use-module (guix packages) | |
30 | #:use-module (guix utils) | |
31 | #:use-module (guix download) | |
53d159f8 | 32 | #:use-module (guix git-download) |
121d9d1a | 33 | #:use-module (guix build-system cmake) |
ce9cf64b | 34 | #:use-module (guix build-system gnu) |
99aa2dce | 35 | #:use-module (guix build-system python) |
b7506f74 | 36 | #:use-module (gnu packages) |
0e418388 KCB |
37 | #:use-module (gnu packages autotools) |
38 | #:use-module (gnu packages bison) | |
39 | #:use-module (gnu packages c) | |
40 | #:use-module (gnu packages compression) | |
41 | #:use-module (gnu packages curl) | |
42 | #:use-module (gnu packages cyrus-sasl) | |
43 | #:use-module (gnu packages databases) | |
44 | #:use-module (gnu packages flex) | |
45 | #:use-module (gnu packages geo) | |
46 | #:use-module (gnu packages gnupg) | |
47 | #:use-module (gnu packages kerberos) | |
48 | #:use-module (gnu packages linux) | |
37a57196 | 49 | #:use-module (gnu packages ncurses) |
0e418388 | 50 | #:use-module (gnu packages networking) |
53d159f8 | 51 | #:use-module (gnu packages perl) |
0e418388 | 52 | #:use-module (gnu packages pkg-config) |
99aa2dce | 53 | #:use-module (gnu packages python) |
b47aae7f | 54 | #:use-module (gnu packages python-build) |
1b2f753d | 55 | #:use-module (gnu packages python-web) |
44d10b1f | 56 | #:use-module (gnu packages python-xyz) |
0e418388 KCB |
57 | #:use-module (gnu packages tcl) |
58 | #:use-module (gnu packages tls)) | |
ce9cf64b RW |
59 | |
60 | (define-public log4cpp | |
61 | (package | |
62 | (name "log4cpp") | |
bc6ca523 | 63 | (version "1.1.3") |
ce9cf64b RW |
64 | (source (origin |
65 | (method url-fetch) | |
66 | (uri (string-append "mirror://sourceforge/log4cpp/log4cpp-" | |
67 | (version-major+minor version) ".x%20%28new%29" | |
68 | "/log4cpp-" (version-major+minor version) | |
69 | "/log4cpp-" version ".tar.gz")) | |
70 | (sha256 | |
71 | (base32 | |
bc6ca523 | 72 | "07gmr3jyaf2239n9sp6h7hwdz1pv7b7aka8n06gmr2fnlmaymfrc")))) |
ce9cf64b | 73 | (build-system gnu-build-system) |
641b9c51 MB |
74 | (arguments |
75 | '(#:phases | |
76 | (modify-phases %standard-phases | |
77 | (add-after 'unpack 'do-not-call-stime | |
78 | (lambda _ | |
79 | ;; Patch out use of 'stime' which was removed from glibc 2.31. | |
80 | ;; The test would not work in the build container anyway. | |
81 | (substitute* "tests/testDailyRollingFileAppender.cpp" | |
82 | (("if \\(stime\\(&now\\) == -1\\)") | |
83 | "if (1)")) | |
84 | #t))))) | |
ce9cf64b RW |
85 | (synopsis "Log library for C++") |
86 | (description | |
87 | "Log4cpp is library of C++ classes for flexible logging to files, syslog, | |
88 | IDSA and other destinations. It is modeled after the Log4j Java library, | |
89 | staying as close to their API as is reasonable.") | |
90 | (home-page "http://log4cpp.sourceforge.net/") | |
91 | (license license:lgpl2.1+))) | |
53d159f8 LC |
92 | |
93 | (define-public glog | |
94 | (package | |
95 | (name "glog") | |
722c1799 | 96 | (version "0.5.0") |
53d159f8 LC |
97 | (home-page "https://github.com/google/glog") |
98 | (source (origin | |
4678cc46 MB |
99 | (method git-fetch) |
100 | (uri (git-reference (url home-page) | |
101 | (commit (string-append "v" version)))) | |
53d159f8 LC |
102 | (sha256 |
103 | (base32 | |
722c1799 | 104 | "17014q25c99qyis6l3fwxidw6222bb269fdlr74gn7pzmzg4lvg3")) |
4678cc46 | 105 | (file-name (git-file-name name version)))) |
722c1799 | 106 | (build-system cmake-build-system) |
53d159f8 | 107 | (native-inputs |
8394619b LC |
108 | (list perl ;for tests |
109 | autoconf automake libtool)) | |
53d159f8 LC |
110 | (synopsis "C++ logging library") |
111 | (description | |
112 | "Google glog is a library that implements application-level logging. | |
113 | This library provides logging APIs based on C++-style streams and various | |
114 | helper macros. You can log a message by simply streaming things to log at a | |
115 | particular severity level. It allows logging to be controlled from the | |
116 | command line.") | |
117 | (license license:bsd-3))) | |
99aa2dce | 118 | |
b47aae7f MO |
119 | ;; This is the legacy version of the tailon package. The new version, written |
120 | ;; in Go in available here: https://github.com/gvalkov/tailon. | |
99aa2dce CB |
121 | (define-public tailon |
122 | (package | |
123 | (name "tailon") | |
b47aae7f | 124 | (version "1.4.3") |
99aa2dce CB |
125 | (source |
126 | (origin | |
127 | (method url-fetch) | |
128 | (uri (pypi-uri name version)) | |
129 | (sha256 | |
130 | (base32 | |
b47aae7f | 131 | "0xkmrivzilsc9wqr8ms67v7399gxnh7pv5687k4rdpdgz4309fwc")))) |
99aa2dce | 132 | (build-system python-build-system) |
b47aae7f MO |
133 | (native-inputs |
134 | (list python-tox python-wheel)) | |
99aa2dce | 135 | (inputs |
b47aae7f MO |
136 | (list python-pyyaml-5 python-sockjs-tornado python-tornado-http-auth |
137 | python-tornado python-deepmerge)) | |
872a6fd9 CB |
138 | (arguments |
139 | `(#:phases | |
140 | (modify-phases %standard-phases | |
141 | (add-after 'unpack 'patch-commands.py | |
b47aae7f MO |
142 | (lambda args |
143 | (substitute* "tailon/commands.py" | |
144 | (("self\\.first_in_path\\('grep'\\)") | |
145 | (string-append"'" (which "grep") "'")) | |
146 | (("self\\.first_in_path\\('gawk', 'awk'\\)") | |
147 | (string-append"'" (which "gawk") "'")) | |
148 | (("self\\.first_in_path\\('gsed', 'sed'\\)") | |
149 | (string-append"'" (which "sed") "'")) | |
150 | (("self\\.first_in_path\\('gtail', 'tail'\\)") | |
151 | (string-append"'" (which "tail") "'"))))) | |
152 | (add-after 'unpack 'relax-requirements | |
153 | (lambda _ | |
154 | (substitute* "setup.py" | |
155 | ((",<5.0.0") ""))))))) | |
99aa2dce CB |
156 | (home-page "https://tailon.readthedocs.io/") |
157 | (synopsis | |
158 | "Webapp for looking at and searching through log files") | |
159 | (description | |
160 | "Tailon provides a web interface around the tail, grep, awk and sed | |
161 | commands, displaying the results via a web interface.") | |
162 | (license license:bsd-3))) | |
37a57196 SR |
163 | |
164 | (define-public multitail | |
165 | (package | |
166 | (name "multitail") | |
d080adc4 | 167 | (version "6.5.2") |
37a57196 SR |
168 | (source |
169 | (origin | |
d080adc4 TGR |
170 | (method git-fetch) |
171 | (uri (git-reference | |
172 | (url "https://github.com/halturin/multitail") | |
173 | (commit (string-append "v" version)))) | |
174 | (file-name (git-file-name name version)) | |
37a57196 | 175 | (sha256 |
d080adc4 | 176 | (base32 "17hg5qpangyx4m7hp2x4h56mp6w3wsaslg1il39qcpwsffh1rihc")))) |
37a57196 SR |
177 | (build-system gnu-build-system) |
178 | (arguments | |
179 | `(#:make-flags | |
c887f7b3 | 180 | (list (string-append "CC=" ,(cc-for-target)) |
d080adc4 TGR |
181 | (string-append "PREFIX=" (assoc-ref %outputs "out")) |
182 | "SYSCONFDIR=$(PREFIX)/etc") | |
37a57196 SR |
183 | #:phases |
184 | (modify-phases %standard-phases | |
d080adc4 TGR |
185 | (add-after 'unpack 'fix-broken-build |
186 | ;; With some luck, you might be able to remove this when updating… | |
187 | (lambda _ | |
188 | (substitute* "Makefile" | |
189 | ((" \\*\\.txt") "") | |
190 | ((".*CONFIG_DIR.*") "") | |
191 | (("^install: .*" match) | |
192 | (string-append match | |
193 | "\t$(INSTALL_DIR) $(DESTDIR)$(SYSCONFDIR)\n"))) | |
194 | (substitute* "version" | |
195 | (("(VERSION=).*" _ assign) | |
196 | (string-append assign ,version))))) | |
197 | (add-after 'unpack 'patch-curses-headers | |
198 | (lambda _ | |
199 | (substitute* "mt.h" | |
200 | (("ncursesw/") "")))) | |
d9624154 | 201 | (delete 'configure)) ; no configure script |
37a57196 | 202 | #:tests? #f)) ; no test suite (make check just runs cppcheck) |
8394619b | 203 | (inputs (list ncurses)) |
37a57196 | 204 | (home-page "https://vanheusden.com/multitail/") |
d9624154 | 205 | (synopsis "Monitor multiple log files") |
37a57196 | 206 | (description |
d9624154 TGR |
207 | "MultiTail can monitor, color, filter, and merge log files and command |
208 | output in multiple windows in a terminal.") | |
37a57196 | 209 | (license license:gpl2+))) |
121d9d1a GB |
210 | |
211 | (define-public spdlog | |
212 | (package | |
213 | (name "spdlog") | |
9bf9da25 | 214 | (version "1.10.0") |
121d9d1a GB |
215 | (source |
216 | (origin | |
217 | (method git-fetch) | |
218 | (uri (git-reference | |
b0e7b699 | 219 | (url "https://github.com/gabime/spdlog") |
121d9d1a | 220 | (commit (string-append "v" version)))) |
f1d4d79f | 221 | (file-name (git-file-name name version)) |
121d9d1a | 222 | (sha256 |
9bf9da25 | 223 | (base32 "02xz017ba9fssm1rp1fcfld7h79awbr6fqai9dxaqp02akp3davk")))) |
121d9d1a GB |
224 | (build-system cmake-build-system) |
225 | ;; TODO run benchmark. Currently not possible, as adding | |
226 | ;; (gnu packages benchmark) forms a dependency cycle | |
227 | (arguments | |
228 | '(#:configure-flags | |
25e00831 | 229 | (list "-DSPDLOG_BUILD_BENCH=OFF" |
b1542d59 | 230 | "-DSPDLOG_BUILD_SHARED=ON" |
25e00831 | 231 | "-DSPDLOG_BUILD_TESTS=ON"))) |
121d9d1a GB |
232 | (home-page "https://github.com/gabime/spdlog") |
233 | (synopsis "Fast C++ logging library") | |
5543d3bb MP |
234 | (description "Spdlog is a very fast header-only/compiled C++ logging |
235 | library.") | |
236 | ;; spdlog is under Expat license, but the bundled fmt library in | |
237 | ;; "include/spdlog/fmt/bundled" is under BSD 2 clause license. | |
238 | (license (list license:expat license:bsd-2)))) | |
0e418388 KCB |
239 | |
240 | (define-public rsyslog | |
241 | (package | |
242 | (name "rsyslog") | |
fa924a97 | 243 | (version "8.2204.1") |
0e418388 KCB |
244 | (source |
245 | (origin | |
246 | (method git-fetch) | |
247 | (uri (git-reference | |
248 | (url "https://github.com/rsyslog/rsyslog.git") | |
249 | (commit (string-append "v" version)))) | |
250 | (file-name (git-file-name name version)) | |
251 | (sha256 | |
fa924a97 | 252 | (base32 "0bsd1n3n4hvlkwf4g85g3fg37mnvkdmxsfdmg273gcachhyl5hbx")))) |
0e418388 KCB |
253 | (build-system gnu-build-system) |
254 | (arguments | |
255 | (list | |
256 | #:phases | |
257 | '(modify-phases %standard-phases | |
258 | ;; autogen.sh calls configure at the end of the script. | |
259 | (replace 'bootstrap | |
260 | (lambda _ (invoke "autoreconf" "-vfi")))) | |
261 | #:configure-flags | |
262 | ;; Rsyslog comes with a plethora of optional modules. We enable most of | |
263 | ;; them for a full-featured build. | |
264 | '(list "--enable-kmsg" | |
265 | "--enable-liblogging_stdlog" | |
0e418388 | 266 | "--enable-unlimited_select" |
0648dc95 | 267 | "--enable-usertools" |
0e418388 KCB |
268 | |
269 | ;; Input plugins | |
270 | "--enable-imbatchreport" | |
271 | "--enable-imczmq" | |
272 | "--enable-imdiag" ;for full tests | |
273 | "--enable-imdocker" | |
274 | "--enable-imfile" | |
275 | "--enable-imkafka" | |
276 | "--enable-improg" | |
277 | "--enable-impstats" | |
278 | "--enable-imptcp" | |
279 | "--enable-imtuxedoulog" | |
280 | ||
281 | ;; Output plugins | |
282 | "--enable-clickhouse" | |
283 | "--enable-elasticsearch" | |
284 | "--enable-mail" | |
285 | "--enable-omczmq" | |
286 | "--enable-omfile_hardened" | |
287 | "--enable-omhttp" | |
288 | "--enable-omhttpfs" | |
289 | "--enable-omkafka" | |
290 | "--enable-omprog" | |
291 | "--enable-omruleset" | |
292 | "--enable-omstdout" | |
293 | "--enable-omtcl" | |
294 | "--enable-omudpspoof" | |
295 | "--enable-omuxsock" | |
296 | ||
297 | ;; Parser Modules | |
298 | "--enable-pmaixforwardedfrom" | |
299 | "--enable-pmciscoios" | |
300 | "--enable-pmcisconames" | |
301 | "--enable-pmdb2diag" | |
302 | "--enable-pmlastmsg" | |
303 | "--enable-pmnormalize" | |
304 | "--enable-pmnull" | |
305 | "--enable-pmpanngfw" | |
306 | "--enable-pmsnare" | |
307 | ||
308 | ;; Message Modification Modules | |
0648dc95 | 309 | "--enable-mmanon" |
0e418388 | 310 | "--enable-mmaudit" |
0648dc95 | 311 | "--enable-mmcount" |
0e418388 KCB |
312 | "--enable-mmdarwin" |
313 | "--enable-mmdblookup" | |
314 | "--enable-mmfields" | |
315 | "--enable-mmjsonparse" | |
316 | "--enable-mmkubernetes" | |
317 | "--enable-mmnormalize" | |
318 | "--enable-mmpstrucdata" | |
319 | "--enable-mmrfc5424addhmac" | |
320 | "--enable-mmrm1stspace" | |
321 | "--enable-mmsequence" | |
322 | "--enable-mmsnmptrapd" | |
323 | "--enable-mmtaghostname" | |
324 | "--enable-mmutf8fix" | |
325 | ||
326 | ;; Database Support | |
327 | "--enable-libdbi" | |
328 | "--enable-mysql" | |
329 | "--enable-pgsql" | |
330 | ||
331 | ;; Protocol Support | |
332 | "--enable-openssl" | |
333 | "--enable-gnutls" | |
334 | "--enable-gssapi-krb5" | |
335 | "--enable-snmp" | |
336 | ||
337 | ;; Function modules | |
0648dc95 TGR |
338 | "--enable-fmhash_xxhash" |
339 | ||
340 | ;; Needed to build rscryutil.1.gz. | |
341 | "--enable-generate-man-pages"))) | |
0e418388 | 342 | (native-inputs |
0648dc95 TGR |
343 | (list autoconf |
344 | automake | |
345 | bison | |
346 | flex | |
347 | libtool | |
348 | pkg-config | |
349 | python-docutils)) ; rst2man for man pages | |
0e418388 KCB |
350 | (inputs |
351 | (list curl | |
352 | cyrus-sasl | |
353 | czmq | |
354 | gnutls | |
355 | libdbi | |
356 | libestr | |
357 | libfastjson | |
358 | libgcrypt | |
359 | liblogging | |
360 | liblognorm | |
361 | libmaxminddb | |
362 | libnet | |
363 | librdkafka | |
364 | lz4 | |
365 | (list mariadb "dev") | |
366 | (list mariadb "lib") | |
367 | mit-krb5 | |
368 | net-snmp | |
369 | openssl | |
370 | postgresql | |
371 | tcl | |
372 | (list util-linux "lib") | |
373 | zeromq | |
374 | zlib)) | |
375 | (home-page "https://www.rsyslog.com/") | |
376 | (synopsis "RSYSLOG is a flexible and fast system for log processing") | |
377 | (description | |
378 | "Rsyslog offers high-performance, great security features and a modular | |
379 | design. While it started as a regular syslogd, rsyslog has evolved into a | |
380 | kind of swiss army knife of logging, being able to accept inputs from a wide | |
381 | variety of sources, transform them, and output the results to diverse | |
382 | destinations.") | |
383 | ;; Most of the source code is licensed under the LGPL3+ with many source | |
384 | ;; files licensed under the terms of the ASL2.0. Some modules are | |
385 | ;; licensed under GPL3+. | |
386 | (license (list license:lgpl3+ | |
387 | license:gpl3+ | |
388 | license:asl2.0)))) |