projects/guix·blob ruby-team · refs

457 lines · 16.3 KiB

1;;; GNU Guix --- Functional package management for GNU
2;;; Copyright © 2016, 2022 Ricardo Wurmus <[email protected]>
3;;; Copyright © 2016, 2017, 2018, 2026 Ludovic Courtès <[email protected]>
4;;; Copyright © 2017 Stefan Reichör <[email protected]>
5;;; Copyright © 2017 Eric Bavier <[email protected]>
6;;; Copyright © 2018–2022 Tobias Geerinckx-Rice <[email protected]>
7;;; Copyright © 2019 Gábor Boskovits <[email protected]>
8;;; Copyright © 2019 Meiyo Peng <[email protected]>
9;;; Copyright © 2020 Marius Bakke <[email protected]>
10;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]>
11;;; Copyright © 2025 Matthew Elwin <[email protected]>
12;;; Copyright © 2025 Nicolas Graves <[email protected]>
13;;;
14;;; This file is part of GNU Guix.
15;;;
16;;; GNU Guix is free software; you can redistribute it and/or modify it
17;;; under the terms of the GNU General Public License as published by
18;;; the Free Software Foundation; either version 3 of the License, or (at
19;;; your option) any later version.
20;;;
21;;; GNU Guix is distributed in the hope that it will be useful, but
22;;; WITHOUT ANY WARRANTY; without even the implied warranty of
23;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24;;; GNU General Public License for more details.
25;;;
26;;; You should have received a copy of the GNU General Public License
27;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
28
29(define-module (gnu packages logging)
30 #:use-module ((guix licenses) #:prefix license:)
31 #:use-module (guix gexp)
32 #:use-module (guix packages)
33 #:use-module (guix utils)
34 #:use-module (guix download)
35 #:use-module (guix git-download)
36 #:use-module (guix build-system cmake)
37 #:use-module (guix build-system gnu)
38 #:use-module (gnu packages)
39 #:use-module (gnu packages apr)
40 #:use-module (gnu packages autotools)
41 #:use-module (gnu packages bison)
42 #:use-module (gnu packages c)
43 #:use-module (gnu packages check)
44 #:use-module (gnu packages cmake)
45 #:use-module (gnu packages compression)
46 #:use-module (gnu packages curl)
47 #:use-module (gnu packages cyrus-sasl)
48 #:use-module (gnu packages databases)
49 #:use-module (gnu packages compiler-tools)
50 #:use-module (gnu packages geo)
51 #:use-module (gnu packages gnupg)
52 #:use-module (gnu packages kerberos)
53 #:use-module (gnu packages linux)
54 #:use-module (gnu packages ncurses)
55 #:use-module (gnu packages networking)
56 #:use-module (gnu packages perl)
57 #:use-module (gnu packages pkg-config)
58 #:use-module (gnu packages pretty-print)
59 #:use-module (gnu packages python)
60 #:use-module (gnu packages python-build)
61 #:use-module (gnu packages python-check)
62 #:use-module (gnu packages python-web)
63 #:use-module (gnu packages python-xyz)
64 #:use-module (gnu packages tcl)
65 #:use-module (gnu packages tls))
66
67(define-public log4cpp
68 (package
69 (name "log4cpp")
70 (version "1.1.3")
71 (source (origin
72 (method url-fetch)
73 (uri (string-append "mirror://sourceforge/log4cpp/log4cpp-"
74 (version-major+minor version) ".x%20%28new%29"
75 "/log4cpp-" (version-major+minor version)
76 "/log4cpp-" version ".tar.gz"))
77 (sha256
78 (base32
79 "07gmr3jyaf2239n9sp6h7hwdz1pv7b7aka8n06gmr2fnlmaymfrc"))))
80 (build-system gnu-build-system)
81 (arguments
82 '(#:phases
83 (modify-phases %standard-phases
84 (add-after 'unpack 'do-not-call-stime
85 (lambda _
86 ;; Patch out use of 'stime' which was removed from glibc 2.31.
87 ;; The test would not work in the build container anyway.
88 (substitute* "tests/testDailyRollingFileAppender.cpp"
89 (("if \\(stime\\(&now\\) == -1\\)")
90 "if (1)"))
91 #t)))))
92 (synopsis "Log library for C++")
93 (description
94 "Log4cpp is library of C++ classes for flexible logging to files, syslog,
95IDSA and other destinations. It is modeled after the Log4j Java library,
96staying as close to their API as is reasonable.")
97 (home-page "https://log4cpp.sourceforge.net/")
98 (license license:lgpl2.1+)))
99
100(define-public log4cxx
101 (package
102 (name "log4cxx")
103 (version "1.4.0")
104 (source
105 (origin
106 (method url-fetch)
107 (uri (string-append "mirror://apache/logging/log4cxx/" version
108 "/apache-log4cxx-" version ".tar.gz"))
109 (sha256
110 (base32 "15kgxmqpbg8brf7zd8mmzr7rvm9zrigz3ak34xb18v2ld8siyb9x"))))
111 (build-system cmake-build-system)
112 (native-inputs (list apr apr-util pkg-config zip))
113 (home-page "https://logging.apache.org/log4cxx/")
114 (synopsis "C++ logging library patterned after Apache log4j")
115 (description
116 "The log4cxx packages provides a C++ logging framework patterned
117after Apache log4j which uses the Apache Portable Runtime for most
118platform-specific code.")
119 (license license:asl2.0)))
120
121(define-public logmich
122 ;; XXX: Does not release anymore.
123 (let ((commit "2610fad6768e5b493b52ff08d60d1eb8825f1ab6")
124 (revision "1"))
125 (package
126 (name "logmich")
127 (version (git-version "0.1.0" revision commit))
128 (source
129 (origin
130 (method git-fetch)
131 (uri (git-reference
132 (url "https://github.com/logmich/logmich")
133 (commit commit)))
134 (file-name (git-file-name name version))
135 (sha256
136 (base32 "02bnnrz0fh216pyn05axhizkmglsyfc29qry4s928dyy4spypynq"))))
137 (build-system cmake-build-system)
138 (arguments
139 (list
140 #:configure-flags
141 #~(list "-DBUILD_TESTS=ON")))
142 (inputs (list fmt-8))
143 (native-inputs (list tinycmmc))
144 (home-page "https://github.com/logmich/logmich")
145 (synopsis "Trivial logging library")
146 (description
147 "This package provides a bare-bones logging library for C++, with only
148a @code{printf}-like syntax and five logging levels.")
149 (license license:gpl3+))))
150
151(define-public glog
152 (package
153 (name "glog")
154 (version "0.5.0")
155 (home-page "https://github.com/google/glog")
156 (source (origin
157 (method git-fetch)
158 (uri (git-reference (url home-page)
159 (commit (string-append "v" version))))
160 (sha256
161 (base32
162 "17014q25c99qyis6l3fwxidw6222bb269fdlr74gn7pzmzg4lvg3"))
163 (file-name (git-file-name name version))
164 (patches (search-patches "glog-windows-h-nonwindows.patch"))))
165 (build-system cmake-build-system)
166 (native-inputs
167 (list perl ;for tests
168 autoconf automake libtool))
169 (synopsis "C++ logging library")
170 (description
171 "Google glog is a library that implements application-level logging.
172This library provides logging APIs based on C++-style streams and various
173helper macros. You can log a message by simply streaming things to log at a
174particular severity level. It allows logging to be controlled from the
175command line.")
176 (license license:bsd-3)))
177
178(define-public glog-next
179 (package
180 (inherit glog)
181 (version "0.7.1")
182 (home-page "https://github.com/google/glog")
183 (source (origin
184 (method git-fetch)
185 (uri (git-reference (url home-page)
186 (commit (string-append "v" version))))
187 (sha256
188 (base32
189 "1zh482ga8mndsw277h9wrq4i5xffji0li3v0xha1i6j1llzicz7s"))
190 (file-name (git-file-name "glog" version))))
191 (arguments
192 (list #:phases
193 #~(modify-phases %standard-phases
194 (add-before 'check 'set-temporary-directory
195 (lambda _
196 ;; By default tests produce junk straight under
197 ;; /tmp/guix-build-glog*, which confuses the
198 ;; 'install-license-files' phase. Set 'TMPDIR' so that
199 ;; junk is out of the way.
200 (setenv "TMPDIR"
201 (string-append (getcwd) "/test-tmp"))
202 (mkdir (getenv "TMPDIR")))))))))
203
204(define-public plog
205 (package
206 (name "plog")
207 (version "1.1.10")
208 (source (origin
209 (method git-fetch)
210 (uri (git-reference
211 (url "https://github.com/SergiusTheBest/plog")
212 (commit version)))
213 (file-name (git-file-name name version))
214 (sha256
215 (base32
216 "1kxqz3vn98y1qij60sxn0ldv5q2xh2zbp7v8cd9m21sf1yp636im"))))
217 (build-system cmake-build-system)
218 (arguments
219 (list #:configure-flags
220 #~'("-DPLOG_BUILD_TESTS=ON")))
221 (home-page "https://github.com/SergiusTheBest/plog")
222 (synopsis "C++ logging library")
223 (description
224 "Plog is a C++ logging library that is designed to be simple, small and
225flexible. It is created as an alternative to existing large libraries and
226provides some unique features such as CSV log format and wide string support.")
227 (license license:expat)))
228
229(define-public multitail
230 (package
231 (name "multitail")
232 (version "7.1.5")
233 (source
234 (origin
235 (method git-fetch)
236 (uri (git-reference
237 (url "https://github.com/folkertvanheusden/multitail")
238 (commit version)))
239 (file-name (git-file-name name version))
240 (sha256
241 (base32 "11kkd2rg3qc7ck5iyha0f8l5lqc1bvwypn80di0h77h7p106blvk"))))
242 (build-system cmake-build-system)
243 (arguments
244 (list
245 #:tests? #f ;no test suite
246 #:phases #~(modify-phases %standard-phases
247 (add-after 'unpack 'patch-curses-headers
248 (lambda _
249 (substitute* "mt.h"
250 (("ncursesw/") "")))))))
251 (inputs (list ncurses))
252 (home-page "https://vanheusden.com/multitail/")
253 (synopsis "Monitor multiple log files")
254 (description
255 "MultiTail can monitor, color, filter, and merge log files and command
256output in multiple windows in a terminal.")
257 (license license:gpl2+)))
258
259(define-public spdlog-1.15
260 (package
261 (name "spdlog")
262 (version "1.15.3")
263 (source
264 (origin
265 (method git-fetch)
266 (uri (git-reference
267 (url "https://github.com/gabime/spdlog")
268 (commit (string-append "v" version))))
269 (file-name (git-file-name name version))
270 (sha256
271 (base32 "12m46hh59rgamr3qg3jyvxf5mkfj0c91ym4v0l79xqcqdps93cyj"))
272 (modules '((guix build utils)))
273 (snippet #~(delete-file-recursively "include/spdlog/fmt/bundled"))))
274 (build-system cmake-build-system)
275 (outputs '("out" "bin"))
276 (arguments
277 (list #:configure-flags
278 #~(list "-DSPDLOG_BUILD_BENCH=ON"
279 "-DSPDLOG_BUILD_SHARED=ON"
280 "-DSPDLOG_FMT_EXTERNAL=ON"
281 #$@(if (%current-target-system)
282 '()
283 '("-DSPDLOG_BUILD_TESTS=ON")))
284 #:phases
285 #~(modify-phases %standard-phases
286 (add-after 'unpack 'patch
287 (lambda _
288 (substitute* "bench/CMakeLists.txt"
289 ;; Add install command for each benchmark program.
290 (("add_executable\\(([^ ]+) .*$" all target)
291 (string-append all
292 "install(TARGETS "
293 target
294 " DESTINATION "
295 #$output:bin "/bin"
296 ")\n"))))))))
297 (native-inputs (list catch2-3.5))
298 (inputs (list googlebenchmark))
299 (propagated-inputs (list fmt-12))
300 (home-page "https://github.com/gabime/spdlog")
301 (synopsis "Fast C++ logging library")
302 (description "Spdlog is a very fast header-only/compiled C++ logging
303library.")
304 (license license:expat)))
305
306;; Update when changing the pinned version of fmt.
307(define-public spdlog spdlog-1.15)
308
309(define-public rsyslog
310 (package
311 (name "rsyslog")
312 (version "8.2512.0")
313 (source
314 (origin
315 (method git-fetch)
316 (uri (git-reference
317 (url "https://github.com/rsyslog/rsyslog.git")
318 (commit (string-append "v" version))))
319 (file-name (git-file-name name version))
320 (sha256
321 (base32 "1w0yg5gwj0153z4vpcqayij6m6asji4jyshlji0i4gz1kic53mab"))))
322 (build-system gnu-build-system)
323 (arguments
324 (list
325 #:phases
326 '(modify-phases %standard-phases
327 ;; autogen.sh calls configure at the end of the script.
328 (replace 'bootstrap
329 (lambda _ (invoke "autoreconf" "-vfi"))))
330 #:configure-flags
331 ;; Rsyslog comes with a plethora of optional modules. We enable most of
332 ;; them for a full-featured build.
333 '(list "--enable-kmsg"
334 "--enable-liblogging_stdlog"
335 "--enable-unlimited_select"
336 "--enable-usertools"
337
338 ;; Input plugins
339 "--enable-imbatchreport"
340 "--enable-imczmq"
341 "--enable-imdiag" ;for full tests
342 "--enable-imdocker"
343 "--enable-imfile"
344 "--enable-imkafka"
345 "--enable-improg"
346 "--enable-impstats"
347 "--enable-imptcp"
348 "--enable-imtuxedoulog"
349
350 ;; Output plugins
351 "--enable-clickhouse"
352 "--enable-elasticsearch"
353 "--enable-mail"
354 "--enable-omczmq"
355 "--enable-omfile_hardened"
356 "--enable-omhttp"
357 "--enable-omhttpfs"
358 "--enable-omkafka"
359 "--enable-omprog"
360 "--enable-omruleset"
361 "--enable-omstdout"
362 "--enable-omtcl"
363 "--enable-omudpspoof"
364 "--enable-omuxsock"
365
366 ;; Parser Modules
367 "--enable-pmaixforwardedfrom"
368 "--enable-pmciscoios"
369 "--enable-pmcisconames"
370 "--enable-pmdb2diag"
371 "--enable-pmlastmsg"
372 "--enable-pmnormalize"
373 "--enable-pmnull"
374 "--enable-pmpanngfw"
375 "--enable-pmsnare"
376
377 ;; Message Modification Modules
378 "--enable-mmanon"
379 "--enable-mmaudit"
380 "--enable-mmcount"
381 "--enable-mmdarwin"
382 "--enable-mmdblookup"
383 "--enable-mmfields"
384 "--enable-mmjsonparse"
385 "--enable-mmkubernetes"
386 "--enable-mmnormalize"
387 "--enable-mmpstrucdata"
388 "--enable-mmrfc5424addhmac"
389 "--enable-mmrm1stspace"
390 "--enable-mmsequence"
391 "--enable-mmsnmptrapd"
392 "--enable-mmtaghostname"
393 "--enable-mmutf8fix"
394
395 ;; Database Support
396 "--enable-libdbi"
397 "--enable-mysql"
398 "--enable-pgsql"
399
400 ;; Protocol Support
401 "--enable-openssl"
402 "--enable-gnutls"
403 "--enable-gssapi-krb5"
404 "--enable-snmp"
405
406 ;; Function modules
407 "--enable-fmhash_xxhash"
408
409 ;; Needed to build rscryutil.1.gz.
410 "--enable-generate-man-pages")))
411 (native-inputs
412 (list autoconf
413 automake
414 bison
415 flex
416 libtool
417 pkg-config
418 python-docutils)) ; rst2man for man pages
419 (inputs
420 (list curl
421 cyrus-sasl
422 czmq
423 gnutls
424 libdbi
425 libestr
426 libfastjson
427 libgcrypt
428 liblogging
429 liblognorm
430 libmaxminddb
431 libnet
432 librdkafka
433 lz4
434 (list mariadb "dev")
435 (list mariadb "lib")
436 mit-krb5
437 net-snmp
438 openssl
439 postgresql
440 tcl
441 (list util-linux "lib")
442 zeromq
443 zlib))
444 (home-page "https://www.rsyslog.com/")
445 (synopsis "RSYSLOG is a flexible and fast system for log processing")
446 (description
447 "Rsyslog offers high-performance, great security features and a modular
448design. While it started as a regular syslogd, rsyslog has evolved into a
449kind of swiss army knife of logging, being able to accept inputs from a wide
450variety of sources, transform them, and output the results to diverse
451destinations.")
452 ;; Most of the source code is licensed under the LGPL3+ with many source
453 ;; files licensed under the terms of the ASL2.0. Some modules are
454 ;; licensed under GPL3+.
455 (license (list license:lgpl3+
456 license:gpl3+
457 license:asl2.0))))