gnu: libretro-lowresnx: Update to 1.2.
[jackhill/guix/guix.git] / gnu / packages / logging.scm
CommitLineData
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>
43f82eec 6;;; Copyright © 2018–2021 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,
71IDSA and other destinations. It is modeled after the Log4j Java library,
72staying 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
ce10e2b3 102 ("autoconf" ,autoconf)
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.
108This library provides logging APIs based on C++-style streams and various
109helper macros. You can log a message by simply streaming things to log at a
110particular severity level. It allows logging to be controlled from the
111command 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
151commands, 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
c887f7b3 168 (list (string-append "CC=" ,(cc-for-target))
7b2b01e3 169 (string-append "PREFIX="
37a57196
SR
170 (assoc-ref %outputs "out")))
171 #:phases
172 (modify-phases %standard-phases
173 (add-after 'unpack 'patch-curses-lib
174 (lambda* (#:key outputs #:allow-other-keys)
175 (let ((out (assoc-ref outputs "out")))
176 (substitute* "mt.h"
177 (("ncursesw\\/panel.h") "panel.h")
178 (("ncursesw\\/ncurses.h") "ncurses.h")))
179 #t))
d9624154 180 (delete 'configure)) ; no configure script
37a57196
SR
181 #:tests? #f)) ; no test suite (make check just runs cppcheck)
182 (inputs `(("ncurses" ,ncurses)))
183 (home-page "https://vanheusden.com/multitail/")
d9624154 184 (synopsis "Monitor multiple log files")
37a57196 185 (description
d9624154
TGR
186 "MultiTail can monitor, color, filter, and merge log files and command
187output in multiple windows in a terminal.")
37a57196 188 (license license:gpl2+)))
121d9d1a
GB
189
190(define-public spdlog
191 (package
192 (name "spdlog")
da29d63a 193 (version "1.8.5")
121d9d1a
GB
194 (source
195 (origin
196 (method git-fetch)
197 (uri (git-reference
b0e7b699 198 (url "https://github.com/gabime/spdlog")
121d9d1a 199 (commit (string-append "v" version))))
f1d4d79f 200 (file-name (git-file-name name version))
121d9d1a 201 (sha256
da29d63a 202 (base32 "179krvg5sad6dviqpcjwg6czzknnilqszrg1d0fgp12h6sy66vqg"))))
121d9d1a
GB
203 (build-system cmake-build-system)
204 ;; TODO run benchmark. Currently not possible, as adding
205 ;; (gnu packages benchmark) forms a dependency cycle
206 (arguments
207 '(#:configure-flags
25e00831
MB
208 (list "-DSPDLOG_BUILD_BENCH=OFF"
209 "-DSPDLOG_BUILD_TESTS=ON")))
121d9d1a
GB
210 (home-page "https://github.com/gabime/spdlog")
211 (synopsis "Fast C++ logging library")
5543d3bb
MP
212 (description "Spdlog is a very fast header-only/compiled C++ logging
213library.")
214 ;; spdlog is under Expat license, but the bundled fmt library in
215 ;; "include/spdlog/fmt/bundled" is under BSD 2 clause license.
216 (license (list license:expat license:bsd-2))))