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 python-xyz)
37 #:use-module (gnu packages autotools))
39 (define-public log4cpp
45 (uri (string-append "mirror://sourceforge/log4cpp/log4cpp-"
46 (version-major+minor version) ".x%20%28new%29"
47 "/log4cpp-" (version-major+minor version)
48 "/log4cpp-" version ".tar.gz"))
51 "07gmr3jyaf2239n9sp6h7hwdz1pv7b7aka8n06gmr2fnlmaymfrc"))))
52 (build-system gnu-build-system)
53 (synopsis "Log library for C++")
55 "Log4cpp is library of C++ classes for flexible logging to files, syslog,
56 IDSA and other destinations. It is modeled after the Log4j Java library,
57 staying as close to their API as is reasonable.")
58 (home-page "http://log4cpp.sourceforge.net/")
59 (license license:lgpl2.1+)))
65 (home-page "https://github.com/google/glog")
68 (uri (string-append home-page "/archive/v" version ".tar.gz"))
71 "1q6ihk2asbx95a56kmyqwysq1x3grrw9jwqllafaidf0l84f903m"))
72 (file-name (string-append name "-" version ".tar.gz"))
73 (patches (search-patches "glog-gcc-5-demangling.patch"))))
74 (build-system gnu-build-system)
76 `(("perl" ,perl) ;for tests
77 ("autoconf" ,autoconf-wrapper)
78 ("automake" ,automake)
79 ("libtool" ,libtool)))
81 '(#:phases (modify-phases %standard-phases
82 (add-after 'unpack 'add-automake-files
84 ;; The 'test-driver' file is a dangling symlink to
85 ;; /usr/share/automake; replace it. We can't just run
86 ;; 'automake -ac' because it complains about version
87 ;; mismatch, so run the whole thing.
88 (delete-file "test-driver")
89 (delete-file "configure") ;it's read-only
90 (invoke "autoreconf" "-vfi")))
91 (add-before 'check 'disable-signal-tests
93 ;; See e.g. https://github.com/google/glog/issues/219
94 ;; and https://github.com/google/glog/issues/256
95 (substitute* "Makefile"
96 (("\tsignalhandler_unittest_sh") "\t$(EMPTY)"))
98 (synopsis "C++ logging library")
100 "Google glog is a library that implements application-level logging.
101 This library provides logging APIs based on C++-style streams and various
102 helper macros. You can log a message by simply streaming things to log at a
103 particular severity level. It allows logging to be controlled from the
105 (license license:bsd-3)))
107 (define-public tailon
114 (uri (pypi-uri name version))
117 "0wl2wm6p3pc0vkk33s7rzgcfvs9cwxfmlz997pdfhlw72r00l7s5"))))
118 (build-system python-build-system)
120 `(("python-pyyaml" ,python-pyyaml)
121 ("python-sockjs-tornado" ,python-sockjs-tornado)
122 ("python-tornado-http-auth" ,python-tornado-http-auth)
123 ("python-tornado" ,python-tornado)))
126 (modify-phases %standard-phases
127 (add-after 'unpack 'patch-commands.py
129 (substitute* "tailon/commands.py"
130 (("self\\.first_in_path\\('grep'\\)")
131 (string-append"'" (which "grep") "'"))
132 (("self\\.first_in_path\\('gawk', 'awk'\\)")
133 (string-append"'" (which "gawk") "'"))
134 (("self\\.first_in_path\\('gsed', 'sed'\\)")
135 (string-append"'" (which "sed") "'"))
136 (("self\\.first_in_path\\('gtail', 'tail'\\)")
137 (string-append"'" (which "tail") "'")))
139 (home-page "https://tailon.readthedocs.io/")
141 "Webapp for looking at and searching through log files")
143 "Tailon provides a web interface around the tail, grep, awk and sed
144 commands, displaying the results via a web interface.")
145 (license license:bsd-3)))
147 (define-public multitail
154 (uri (string-append "https://vanheusden.com/multitail/multitail-"
158 "1zd1r89xkxngl1pdrvsc877838nwkfqkbcgfqm3vglwalxc587dg"))))
159 (build-system gnu-build-system)
164 (string-append "DESTDIR="
165 (assoc-ref %outputs "out")))
167 (modify-phases %standard-phases
168 (add-after 'unpack 'patch-curses-lib
169 (lambda* (#:key outputs #:allow-other-keys)
170 (let ((out (assoc-ref outputs "out")))
172 (("ncursesw\\/panel.h") "panel.h")
173 (("ncursesw\\/ncurses.h") "ncurses.h")))
176 #:tests? #f)) ; no test suite (make check just runs cppcheck)
177 (inputs `(("ncurses" ,ncurses)))
178 (home-page "https://vanheusden.com/multitail/")
179 (synopsis "Monitor multiple logfiles")
181 "MultiTail allows you to monitor logfiles and command output in multiple
182 windows in a terminal, colorize, filter and merge.")
183 (license license:gpl2+)))