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