gnu: xorg-sgml-doctools: Update to 1.12.
[jackhill/guix/guix.git] / gnu / packages / logging.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
5 ;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
6 ;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <me@tobias.gr>
7 ;;; Copyright © 2019 Gábor Boskovits <boskovits@gmail.com>
8 ;;; Copyright © 2019 Meiyo Peng <meiyo@riseup.net>
9 ;;; Copyright © 2020 Marius Bakke <mbakke@fastmail.com>
10 ;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
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)
32 #:use-module (guix git-download)
33 #:use-module (guix build-system cmake)
34 #:use-module (guix build-system gnu)
35 #:use-module (guix build-system python)
36 #:use-module (gnu packages)
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)
49 #:use-module (gnu packages ncurses)
50 #:use-module (gnu packages networking)
51 #:use-module (gnu packages perl)
52 #:use-module (gnu packages pkg-config)
53 #:use-module (gnu packages python)
54 #:use-module (gnu packages python-build)
55 #:use-module (gnu packages python-web)
56 #:use-module (gnu packages python-xyz)
57 #:use-module (gnu packages tcl)
58 #:use-module (gnu packages tls))
59
60 (define-public log4cpp
61 (package
62 (name "log4cpp")
63 (version "1.1.3")
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
72 "07gmr3jyaf2239n9sp6h7hwdz1pv7b7aka8n06gmr2fnlmaymfrc"))))
73 (build-system gnu-build-system)
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)))))
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+)))
92
93 (define-public glog
94 (package
95 (name "glog")
96 (version "0.5.0")
97 (home-page "https://github.com/google/glog")
98 (source (origin
99 (method git-fetch)
100 (uri (git-reference (url home-page)
101 (commit (string-append "v" version))))
102 (sha256
103 (base32
104 "17014q25c99qyis6l3fwxidw6222bb269fdlr74gn7pzmzg4lvg3"))
105 (file-name (git-file-name name version))))
106 (build-system cmake-build-system)
107 (native-inputs
108 (list perl ;for tests
109 autoconf automake libtool))
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)))
118
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.
121 (define-public tailon
122 (package
123 (name "tailon")
124 (version "1.4.3")
125 (source
126 (origin
127 (method url-fetch)
128 (uri (pypi-uri name version))
129 (sha256
130 (base32
131 "0xkmrivzilsc9wqr8ms67v7399gxnh7pv5687k4rdpdgz4309fwc"))))
132 (build-system python-build-system)
133 (native-inputs
134 (list python-tox python-wheel))
135 (inputs
136 (list python-pyyaml-5 python-sockjs-tornado python-tornado-http-auth
137 python-tornado python-deepmerge))
138 (arguments
139 `(#:phases
140 (modify-phases %standard-phases
141 (add-after 'unpack 'patch-commands.py
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") "")))))))
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)))
163
164 (define-public multitail
165 (package
166 (name "multitail")
167 (version "6.5.0")
168 (source
169 (origin
170 (method url-fetch)
171 (uri (string-append "https://vanheusden.com/multitail/multitail-"
172 version ".tgz"))
173 (sha256
174 (base32 "1vd9vdxyxsccl64ilx542ya5vlw2bpg6gnkq1x8cfqy6vxvmx7dj"))))
175 (build-system gnu-build-system)
176 (arguments
177 `(#:make-flags
178 (list (string-append "CC=" ,(cc-for-target))
179 (string-append "PREFIX="
180 (assoc-ref %outputs "out")))
181 #:phases
182 (modify-phases %standard-phases
183 (add-after 'unpack 'patch-curses-lib
184 (lambda* (#:key outputs #:allow-other-keys)
185 (let ((out (assoc-ref outputs "out")))
186 (substitute* "mt.h"
187 (("ncursesw\\/panel.h") "panel.h")
188 (("ncursesw\\/ncurses.h") "ncurses.h")))
189 #t))
190 (delete 'configure)) ; no configure script
191 #:tests? #f)) ; no test suite (make check just runs cppcheck)
192 (inputs (list ncurses))
193 (home-page "https://vanheusden.com/multitail/")
194 (synopsis "Monitor multiple log files")
195 (description
196 "MultiTail can monitor, color, filter, and merge log files and command
197 output in multiple windows in a terminal.")
198 (license license:gpl2+)))
199
200 (define-public spdlog
201 (package
202 (name "spdlog")
203 (version "1.10.0")
204 (source
205 (origin
206 (method git-fetch)
207 (uri (git-reference
208 (url "https://github.com/gabime/spdlog")
209 (commit (string-append "v" version))))
210 (file-name (git-file-name name version))
211 (sha256
212 (base32 "02xz017ba9fssm1rp1fcfld7h79awbr6fqai9dxaqp02akp3davk"))))
213 (build-system cmake-build-system)
214 ;; TODO run benchmark. Currently not possible, as adding
215 ;; (gnu packages benchmark) forms a dependency cycle
216 (arguments
217 '(#:configure-flags
218 (list "-DSPDLOG_BUILD_BENCH=OFF"
219 "-DSPDLOG_BUILD_SHARED=ON"
220 "-DSPDLOG_BUILD_TESTS=ON")))
221 (home-page "https://github.com/gabime/spdlog")
222 (synopsis "Fast C++ logging library")
223 (description "Spdlog is a very fast header-only/compiled C++ logging
224 library.")
225 ;; spdlog is under Expat license, but the bundled fmt library in
226 ;; "include/spdlog/fmt/bundled" is under BSD 2 clause license.
227 (license (list license:expat license:bsd-2))))
228
229 (define-public rsyslog
230 (package
231 (name "rsyslog")
232 (version "8.2204.1")
233 (source
234 (origin
235 (method git-fetch)
236 (uri (git-reference
237 (url "https://github.com/rsyslog/rsyslog.git")
238 (commit (string-append "v" version))))
239 (file-name (git-file-name name version))
240 (sha256
241 (base32 "0bsd1n3n4hvlkwf4g85g3fg37mnvkdmxsfdmg273gcachhyl5hbx"))))
242 (build-system gnu-build-system)
243 (arguments
244 (list
245 #:phases
246 '(modify-phases %standard-phases
247 ;; autogen.sh calls configure at the end of the script.
248 (replace 'bootstrap
249 (lambda _ (invoke "autoreconf" "-vfi"))))
250 #:configure-flags
251 ;; Rsyslog comes with a plethora of optional modules. We enable most of
252 ;; them for a full-featured build.
253 '(list "--enable-kmsg"
254 "--enable-liblogging_stdlog"
255 "--enable-unlimited_select"
256 "--enable-usertools"
257
258 ;; Input plugins
259 "--enable-imbatchreport"
260 "--enable-imczmq"
261 "--enable-imdiag" ;for full tests
262 "--enable-imdocker"
263 "--enable-imfile"
264 "--enable-imkafka"
265 "--enable-improg"
266 "--enable-impstats"
267 "--enable-imptcp"
268 "--enable-imtuxedoulog"
269
270 ;; Output plugins
271 "--enable-clickhouse"
272 "--enable-elasticsearch"
273 "--enable-mail"
274 "--enable-omczmq"
275 "--enable-omfile_hardened"
276 "--enable-omhttp"
277 "--enable-omhttpfs"
278 "--enable-omkafka"
279 "--enable-omprog"
280 "--enable-omruleset"
281 "--enable-omstdout"
282 "--enable-omtcl"
283 "--enable-omudpspoof"
284 "--enable-omuxsock"
285
286 ;; Parser Modules
287 "--enable-pmaixforwardedfrom"
288 "--enable-pmciscoios"
289 "--enable-pmcisconames"
290 "--enable-pmdb2diag"
291 "--enable-pmlastmsg"
292 "--enable-pmnormalize"
293 "--enable-pmnull"
294 "--enable-pmpanngfw"
295 "--enable-pmsnare"
296
297 ;; Message Modification Modules
298 "--enable-mmanon"
299 "--enable-mmaudit"
300 "--enable-mmcount"
301 "--enable-mmdarwin"
302 "--enable-mmdblookup"
303 "--enable-mmfields"
304 "--enable-mmjsonparse"
305 "--enable-mmkubernetes"
306 "--enable-mmnormalize"
307 "--enable-mmpstrucdata"
308 "--enable-mmrfc5424addhmac"
309 "--enable-mmrm1stspace"
310 "--enable-mmsequence"
311 "--enable-mmsnmptrapd"
312 "--enable-mmtaghostname"
313 "--enable-mmutf8fix"
314
315 ;; Database Support
316 "--enable-libdbi"
317 "--enable-mysql"
318 "--enable-pgsql"
319
320 ;; Protocol Support
321 "--enable-openssl"
322 "--enable-gnutls"
323 "--enable-gssapi-krb5"
324 "--enable-snmp"
325
326 ;; Function modules
327 "--enable-fmhash_xxhash"
328
329 ;; Needed to build rscryutil.1.gz.
330 "--enable-generate-man-pages")))
331 (native-inputs
332 (list autoconf
333 automake
334 bison
335 flex
336 libtool
337 pkg-config
338 python-docutils)) ; rst2man for man pages
339 (inputs
340 (list curl
341 cyrus-sasl
342 czmq
343 gnutls
344 libdbi
345 libestr
346 libfastjson
347 libgcrypt
348 liblogging
349 liblognorm
350 libmaxminddb
351 libnet
352 librdkafka
353 lz4
354 (list mariadb "dev")
355 (list mariadb "lib")
356 mit-krb5
357 net-snmp
358 openssl
359 postgresql
360 tcl
361 (list util-linux "lib")
362 zeromq
363 zlib))
364 (home-page "https://www.rsyslog.com/")
365 (synopsis "RSYSLOG is a flexible and fast system for log processing")
366 (description
367 "Rsyslog offers high-performance, great security features and a modular
368 design. While it started as a regular syslogd, rsyslog has evolved into a
369 kind of swiss army knife of logging, being able to accept inputs from a wide
370 variety of sources, transform them, and output the results to diverse
371 destinations.")
372 ;; Most of the source code is licensed under the LGPL3+ with many source
373 ;; files licensed under the terms of the ASL2.0. Some modules are
374 ;; licensed under GPL3+.
375 (license (list license:lgpl3+
376 license:gpl3+
377 license:asl2.0))))