gnu: Add ruby-commander.
[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 python-xyz)
37 #:use-module (gnu packages autotools))
38
39 (define-public log4cpp
40 (package
41 (name "log4cpp")
42 (version "1.1.3")
43 (source (origin
44 (method url-fetch)
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"))
49 (sha256
50 (base32
51 "07gmr3jyaf2239n9sp6h7hwdz1pv7b7aka8n06gmr2fnlmaymfrc"))))
52 (build-system gnu-build-system)
53 (synopsis "Log library for C++")
54 (description
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+)))
60
61 (define-public glog
62 (package
63 (name "glog")
64 (version "0.3.5")
65 (home-page "https://github.com/google/glog")
66 (source (origin
67 (method url-fetch)
68 (uri (string-append home-page "/archive/v" version ".tar.gz"))
69 (sha256
70 (base32
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)
75 (native-inputs
76 `(("perl" ,perl) ;for tests
77 ("autoconf" ,autoconf-wrapper)
78 ("automake" ,automake)
79 ("libtool" ,libtool)))
80 (arguments
81 '(#:phases (modify-phases %standard-phases
82 (add-after 'unpack 'add-automake-files
83 (lambda _
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
92 (lambda _
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)"))
97 #t)))))
98 (synopsis "C++ logging library")
99 (description
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
104 command line.")
105 (license license:bsd-3)))
106
107 (define-public tailon
108 (package
109 (name "tailon")
110 (version "1.3.0")
111 (source
112 (origin
113 (method url-fetch)
114 (uri (pypi-uri name version))
115 (sha256
116 (base32
117 "0wl2wm6p3pc0vkk33s7rzgcfvs9cwxfmlz997pdfhlw72r00l7s5"))))
118 (build-system python-build-system)
119 (inputs
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)))
124 (arguments
125 `(#:phases
126 (modify-phases %standard-phases
127 (add-after 'unpack 'patch-commands.py
128 (lambda args
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") "'")))
138 #t)))))
139 (home-page "https://tailon.readthedocs.io/")
140 (synopsis
141 "Webapp for looking at and searching through log files")
142 (description
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)))
146
147 (define-public multitail
148 (package
149 (name "multitail")
150 (version "6.4.2")
151 (source
152 (origin
153 (method url-fetch)
154 (uri (string-append "https://vanheusden.com/multitail/multitail-"
155 version ".tgz"))
156 (sha256
157 (base32
158 "1zd1r89xkxngl1pdrvsc877838nwkfqkbcgfqm3vglwalxc587dg"))))
159 (build-system gnu-build-system)
160 (arguments
161 `(#:make-flags
162 (list "CC=gcc"
163 "PREFIX="
164 (string-append "DESTDIR="
165 (assoc-ref %outputs "out")))
166 #:phases
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")))
171 (substitute* "mt.h"
172 (("ncursesw\\/panel.h") "panel.h")
173 (("ncursesw\\/ncurses.h") "ncurses.h")))
174 #t))
175 (delete 'configure))
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")
180 (description
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+)))