Import lnav-0.7.3 as sysutils/lnav.
An advanced log file viewer for the small-scale. Watch and analyze your log files from a terminal. Many logging tools, like Splunk, provide great features but are optimized for large-scale deployments. They require installing and configuring servers before they can be effectively used. There is still a need for a robust log file analyzer for the terminal. Just point lnav to a directory and it will take care of the rest. File formats are automatically detected and compressed files are unpacked on the fly. Log files are a wealth of information, lnav can help highlight the parts that are important and filter out the noise.
This commit is contained in:
parent
27160fa215
commit
937d9e5be1
9 changed files with 150 additions and 0 deletions
14
sysutils/lnav/DESCR
Normal file
14
sysutils/lnav/DESCR
Normal file
|
@ -0,0 +1,14 @@
|
|||
An advanced log file viewer for the small-scale. Watch and analyze
|
||||
your log files from a terminal.
|
||||
|
||||
Many logging tools, like Splunk, provide great features but are
|
||||
optimized for large-scale deployments. They require installing
|
||||
and configuring servers before they can be effectively used. There
|
||||
is still a need for a robust log file analyzer for the terminal.
|
||||
|
||||
Just point lnav to a directory and it will take care of the rest.
|
||||
File formats are automatically detected and compressed files are
|
||||
unpacked on the fly.
|
||||
|
||||
Log files are a wealth of information, lnav can help highlight the
|
||||
parts that are important and filter out the noise.
|
24
sysutils/lnav/Makefile
Normal file
24
sysutils/lnav/Makefile
Normal file
|
@ -0,0 +1,24 @@
|
|||
# $NetBSD: Makefile,v 1.1 2015/09/05 22:12:04 wiz Exp $
|
||||
|
||||
DISTNAME= lnav-0.7.3
|
||||
CATEGORIES= textproc
|
||||
MASTER_SITES= ${MASTER_SITE_GITHUB:=tstack/}
|
||||
GITHUB_RELEASE= v${PKGVERSION_NOREV}
|
||||
EXTRACT_SUFX= .tar.bz2
|
||||
|
||||
MAINTAINER= pkgsrc-users@NetBSD.org
|
||||
HOMEPAGE= http://lnav.org/
|
||||
COMMENT= Log file navigator, an enhanced log viewer
|
||||
LICENSE= 2-clause-bsd
|
||||
|
||||
GNU_CONFIGURE= yes
|
||||
USE_LANGUAGES= c c++
|
||||
|
||||
.include "../../archivers/bzip2/buildlink3.mk"
|
||||
.include "../../databases/sqlite3/buildlink3.mk"
|
||||
.include "../../devel/pcre/buildlink3.mk"
|
||||
.include "../../devel/readline/buildlink3.mk"
|
||||
.include "../../devel/zlib/buildlink3.mk"
|
||||
.include "../../lang/python/application.mk"
|
||||
.include "../../devel/ncursesw/buildlink3.mk"
|
||||
.include "../../mk/bsd.pkg.mk"
|
3
sysutils/lnav/PLIST
Normal file
3
sysutils/lnav/PLIST
Normal file
|
@ -0,0 +1,3 @@
|
|||
@comment $NetBSD: PLIST,v 1.1 2015/09/05 22:12:04 wiz Exp $
|
||||
bin/lnav
|
||||
man/man1/lnav.1
|
10
sysutils/lnav/distinfo
Normal file
10
sysutils/lnav/distinfo
Normal file
|
@ -0,0 +1,10 @@
|
|||
$NetBSD: distinfo,v 1.1 2015/09/05 22:12:04 wiz Exp $
|
||||
|
||||
SHA1 (lnav-0.7.3.tar.bz2) = 561d440bde7461db7f4dfbfbf3ce47fc58aeccf1
|
||||
RMD160 (lnav-0.7.3.tar.bz2) = 8b1795ed44448dd1eb11a51c2a89816ba1634899
|
||||
Size (lnav-0.7.3.tar.bz2) = 399142 bytes
|
||||
SHA1 (patch-src_data__parser.hh) = 0f976ff3df94af045d6d2be53cef964060f507ce
|
||||
SHA1 (patch-src_grep__proc.cc) = f8d23f8c2abf8d99ae27d71dedd9d76ff4ad4a87
|
||||
SHA1 (patch-src_log__format.hh) = 14b081db5e839da23dedac624a571a9cc5dffef8
|
||||
SHA1 (patch-src_pretty__printer.hh) = fa28e901539fdddfb69875d39efe6f1c74b83b0d
|
||||
SHA1 (patch-src_test__override.c) = 67c3fa4785a75eae1bfc8a9ed725276b37eca4ec
|
24
sysutils/lnav/patches/patch-src_data__parser.hh
Normal file
24
sysutils/lnav/patches/patch-src_data__parser.hh
Normal file
|
@ -0,0 +1,24 @@
|
|||
$NetBSD: patch-src_data__parser.hh,v 1.1 2015/09/05 22:12:04 wiz Exp $
|
||||
|
||||
Remove unused variables.
|
||||
|
||||
--- src/data_parser.hh.orig 2015-03-31 13:30:23.000000000 +0000
|
||||
+++ src/data_parser.hh
|
||||
@@ -437,8 +437,6 @@ private:
|
||||
}
|
||||
|
||||
if (iter->e_token == this->dp_format->df_terminator) {
|
||||
- std::vector<element> key_copy;
|
||||
-
|
||||
value.SPLICE(value.end(),
|
||||
key_comps,
|
||||
key_comps.begin(),
|
||||
@@ -480,8 +478,6 @@ private:
|
||||
}
|
||||
else if (key_iter->e_token ==
|
||||
this->dp_format->df_terminator) {
|
||||
- std::vector<element> key_copy;
|
||||
-
|
||||
value.SPLICE(value.end(),
|
||||
key_comps,
|
||||
key_comps.begin(),
|
14
sysutils/lnav/patches/patch-src_grep__proc.cc
Normal file
14
sysutils/lnav/patches/patch-src_grep__proc.cc
Normal file
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: patch-src_grep__proc.cc,v 1.1 2015/09/05 22:12:04 wiz Exp $
|
||||
|
||||
stdout is not an lvalue, and if it was, this looks idempotent.
|
||||
|
||||
--- src/grep_proc.cc.orig 2015-04-09 03:40:09.000000000 +0000
|
||||
+++ src/grep_proc.cc
|
||||
@@ -159,7 +159,6 @@ void grep_proc::child_loop(void)
|
||||
char outbuf[BUFSIZ * 2];
|
||||
string line_value;
|
||||
|
||||
- stdout = fdopen(STDOUT_FILENO, "w");
|
||||
/* Make sure buffering is on, not sure of the state in the parent. */
|
||||
if (setvbuf(stdout, outbuf, _IOFBF, BUFSIZ * 2) < 0) {
|
||||
perror("setvbuf");
|
27
sysutils/lnav/patches/patch-src_log__format.hh
Normal file
27
sysutils/lnav/patches/patch-src_log__format.hh
Normal file
|
@ -0,0 +1,27 @@
|
|||
$NetBSD: patch-src_log__format.hh,v 1.1 2015/09/05 22:12:04 wiz Exp $
|
||||
|
||||
To avoid this error on NetBSD:
|
||||
In file included from logfile.hh:47:0,
|
||||
from logfile.cc:47:
|
||||
log_format.hh: In member function 'const string logline_value::to_string() const':
|
||||
log_format.hh:411:50: error: expected ')' before 'PRId64'
|
||||
snprintf(buffer, sizeof(buffer), "%" PRId64, this->lv_number.i);
|
||||
^
|
||||
log_format.hh:411:75: warning: spurious trailing '%' in format [-Wformat=]
|
||||
snprintf(buffer, sizeof(buffer), "%" PRId64, this->lv_number.i);
|
||||
^
|
||||
log_format.hh:411:75: warning: too many arguments for format [-Wformat-extra-args]
|
||||
log_format.hh:411:75: warning: spurious trailing '%' in format [-Wformat=]
|
||||
log_format.hh:411:75: warning: too many arguments for format [-Wformat-extra-args]
|
||||
|
||||
--- src/log_format.hh.orig 2015-04-11 05:56:05.000000000 +0000
|
||||
+++ src/log_format.hh
|
||||
@@ -408,7 +408,7 @@ public:
|
||||
}
|
||||
|
||||
case VALUE_INTEGER:
|
||||
- snprintf(buffer, sizeof(buffer), "%" PRId64, this->lv_number.i);
|
||||
+ snprintf(buffer, sizeof(buffer), "%ld", this->lv_number.i);
|
||||
break;
|
||||
|
||||
case VALUE_FLOAT:
|
19
sysutils/lnav/patches/patch-src_pretty__printer.hh
Normal file
19
sysutils/lnav/patches/patch-src_pretty__printer.hh
Normal file
|
@ -0,0 +1,19 @@
|
|||
$NetBSD: patch-src_pretty__printer.hh,v 1.1 2015/09/05 22:12:04 wiz Exp $
|
||||
|
||||
Avoid name conflict with included header.
|
||||
|
||||
--- src/pretty_printer.hh.orig 2015-04-11 02:51:00.000000000 +0000
|
||||
+++ src/pretty_printer.hh
|
||||
@@ -171,10 +171,10 @@ private:
|
||||
|
||||
void ascend() {
|
||||
if (this->pp_depth > 0) {
|
||||
- int lines = this->pp_body_lines.top();
|
||||
+ int clines = this->pp_body_lines.top();
|
||||
this->pp_depth -= 1;
|
||||
this->pp_body_lines.pop();
|
||||
- this->pp_body_lines.top() += lines;
|
||||
+ this->pp_body_lines.top() += clines;
|
||||
}
|
||||
else {
|
||||
this->pp_body_lines.top() = 0;
|
15
sysutils/lnav/patches/patch-src_test__override.c
Normal file
15
sysutils/lnav/patches/patch-src_test__override.c
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-src_test__override.c,v 1.1 2015/09/05 22:12:04 wiz Exp $
|
||||
|
||||
Match NetBSD version of gettimeofday().
|
||||
|
||||
--- src/test_override.c.orig 2015-04-04 10:42:12.000000000 +0000
|
||||
+++ src/test_override.c
|
||||
@@ -47,7 +47,7 @@ time_t time(time_t *loc)
|
||||
return retval;
|
||||
}
|
||||
|
||||
-int gettimeofday(struct timeval *tv, struct timezone *tz)
|
||||
+int gettimeofday(struct timeval *tv, void *tz)
|
||||
{
|
||||
tv->tv_sec = 1370546000;
|
||||
tv->tv_usec = 123456;
|
Loading…
Reference in a new issue