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