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>
8 ;;; This file is part of GNU Guix.
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.
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.
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/>.
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))
38 (define-public log4cpp
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"))
50 "07gmr3jyaf2239n9sp6h7hwdz1pv7b7aka8n06gmr2fnlmaymfrc"))))
51 (build-system gnu-build-system)
52 (synopsis "Log library for C++")
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+)))
64 (home-page "https://github.com/google/glog")
67 (uri (string-append home-page "/archive/v" version ".tar.gz"))
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)
75 `(("perl" ,perl) ;for tests
76 ("autoconf" ,autoconf-wrapper)
77 ("automake" ,automake)
78 ("libtool" ,libtool)))
80 '(#:phases (modify-phases %standard-phases
81 (add-after 'unpack 'add-automake-files
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
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)"))
97 (synopsis "C++ logging library")
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
104 (license license:bsd-3)))
106 (define-public tailon
113 (uri (pypi-uri name version))
116 "0wl2wm6p3pc0vkk33s7rzgcfvs9cwxfmlz997pdfhlw72r00l7s5"))))
117 (build-system python-build-system)
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)))
125 (modify-phases %standard-phases
126 (add-after 'unpack 'patch-commands.py
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") "'")))
138 (home-page "https://tailon.readthedocs.io/")
140 "Webapp for looking at and searching through log files")
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)))
146 (define-public multitail
153 (uri (string-append "https://vanheusden.com/multitail/multitail-"
157 "1zd1r89xkxngl1pdrvsc877838nwkfqkbcgfqm3vglwalxc587dg"))))
158 (build-system gnu-build-system)
163 (string-append "DESTDIR="
164 (assoc-ref %outputs "out")))
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")))
171 (("ncursesw\\/panel.h") "panel.h")
172 (("ncursesw\\/ncurses.h") "ncurses.h")))
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")
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+)))