1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
3 ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo@gnu.org>
4 ;;; Copyright © 2017 Stefan Reichör <stefan@xsteve.at>
6 ;;; This file is part of GNU Guix.
8 ;;; GNU Guix is free software; you can redistribute it and/or modify it
9 ;;; under the terms of the GNU General Public License as published by
10 ;;; the Free Software Foundation; either version 3 of the License, or (at
11 ;;; your option) any later version.
13 ;;; GNU Guix is distributed in the hope that it will be useful, but
14 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
15 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 ;;; GNU General Public License for more details.
18 ;;; You should have received a copy of the GNU General Public License
19 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
21 (define-module (gnu packages logging)
22 #:use-module ((guix licenses) #:prefix license:)
23 #:use-module (guix packages)
24 #:use-module (guix utils)
25 #:use-module (guix download)
26 #:use-module (guix git-download)
27 #:use-module (guix build-system gnu)
28 #:use-module (guix build-system python)
29 #:use-module (gnu packages)
30 #:use-module (gnu packages ncurses)
31 #:use-module (gnu packages perl)
32 #:use-module (gnu packages python)
33 #:use-module (gnu packages autotools))
35 (define-public log4cpp
41 (uri (string-append "mirror://sourceforge/log4cpp/log4cpp-"
42 (version-major+minor version) ".x%20%28new%29"
43 "/log4cpp-" (version-major+minor version)
44 "/log4cpp-" version ".tar.gz"))
47 "1l5yz5rfzzv6g3ynrj14mxfsk08cp5h1ssr7d74hjs0accrg7arm"))))
48 (build-system gnu-build-system)
49 (synopsis "Log library for C++")
51 "Log4cpp is library of C++ classes for flexible logging to files, syslog,
52 IDSA and other destinations. It is modeled after the Log4j Java library,
53 staying as close to their API as is reasonable.")
54 (home-page "http://log4cpp.sourceforge.net/")
55 (license license:lgpl2.1+)))
61 (home-page "https://github.com/google/glog")
64 (uri (string-append home-page "/archive/v" version ".tar.gz"))
67 "1q6ihk2asbx95a56kmyqwysq1x3grrw9jwqllafaidf0l84f903m"))
68 (file-name (string-append name "-" version ".tar.gz"))
69 (patches (search-patches "glog-gcc-5-demangling.patch"))))
70 (build-system gnu-build-system)
72 `(("perl" ,perl) ;for tests
73 ("autoconf" ,(autoconf-wrapper))
74 ("automake" ,automake)
75 ("libtool" ,libtool)))
77 '(#:phases (modify-phases %standard-phases
78 (add-before 'configure 'add-automake-files
80 ;; The 'test-driver' file is a dangling symlink to
81 ;; /usr/share/automake; replace it. We can't just run
82 ;; 'automake -ac' because it complains about version
83 ;; mismatch, so run the whole thing.
84 (delete-file "test-driver")
85 (delete-file "configure") ;it's read-only
86 (zero? (system* "autoreconf" "-vfi")))))))
87 (synopsis "C++ logging library")
89 "Google glog is a library that implements application-level logging.
90 This library provides logging APIs based on C++-style streams and various
91 helper macros. You can log a message by simply streaming things to log at a
92 particular severity level. It allows logging to be controlled from the
94 (license license:bsd-3)))
103 (uri (pypi-uri name version))
106 "08clrwpfdxcv2z2b5ardpmim4alahbw4l7631dhw62xhbcf6wjzz"))))
107 (build-system python-build-system)
109 `(("python-pyyaml" ,python-pyyaml)
110 ("python-sockjs-tornado" ,python-sockjs-tornado)
111 ("python-tornado" ,python-tornado)))
114 (modify-phases %standard-phases
115 (add-after 'unpack 'patch-commands.py
117 (substitute* "tailon/commands.py"
118 (("self\\.first_in_path\\('grep'\\)")
119 (string-append"'" (which "grep") "'"))
120 (("self\\.first_in_path\\('gawk', 'awk'\\)")
121 (string-append"'" (which "gawk") "'"))
122 (("self\\.first_in_path\\('gsed', 'sed'\\)")
123 (string-append"'" (which "sed") "'"))
124 (("self\\.first_in_path\\('gtail', 'tail'\\)")
125 (string-append"'" (which "tail") "'")))
127 (home-page "https://tailon.readthedocs.io/")
129 "Webapp for looking at and searching through log files")
131 "Tailon provides a web interface around the tail, grep, awk and sed
132 commands, displaying the results via a web interface.")
133 (license license:bsd-3)))
135 (define-public multitail
142 (uri (string-append "https://vanheusden.com/multitail/multitail-"
146 "1zd1r89xkxngl1pdrvsc877838nwkfqkbcgfqm3vglwalxc587dg"))))
147 (build-system gnu-build-system)
152 (string-append "DESTDIR="
153 (assoc-ref %outputs "out")))
155 (modify-phases %standard-phases
156 (add-after 'unpack 'patch-curses-lib
157 (lambda* (#:key outputs #:allow-other-keys)
158 (let ((out (assoc-ref outputs "out")))
160 (("ncursesw\\/panel.h") "panel.h")
161 (("ncursesw\\/ncurses.h") "ncurses.h")))
164 #:tests? #f)) ; no test suite (make check just runs cppcheck)
165 (inputs `(("ncurses" ,ncurses)))
166 (home-page "https://vanheusden.com/multitail/")
167 (synopsis "Monitor multiple logfiles")
169 "MultiTail allows you to monitor logfiles and command output in multiple
170 windows in a terminal, colorize, filter and merge.")
171 (license license:gpl2+)))