mirror of https://github.com/tstack/lnav.git
[json] some more journald log tweaks
Defect Number: Reviewed By: Testing Done:
This commit is contained in:
parent
491c5a5496
commit
bc26b92199
|
@ -1,5 +1,5 @@
|
|||
name: lnav
|
||||
version: '0.8.3'
|
||||
version: '0.8.3-git'
|
||||
summary: Log file navigator
|
||||
description: |
|
||||
The log file navigator, lnav, is an enhanced log file viewer
|
||||
|
@ -21,7 +21,7 @@ parts:
|
|||
lnav:
|
||||
plugin: autotools
|
||||
source: https://github.com/tstack/lnav.git
|
||||
source-tag: v0.8.3
|
||||
# source-tag: v0.8.3
|
||||
build-packages:
|
||||
- build-essential
|
||||
- libpcre3-dev
|
||||
|
|
|
@ -700,8 +700,9 @@
|
|||
"url" : "https://www.freedesktop.org/wiki/Software/systemd/json/",
|
||||
"json" : true,
|
||||
"hide-extra" : true,
|
||||
"convert-to-local-time" : true,
|
||||
"line-format" : [
|
||||
{ "field" : "__timestamp__" },
|
||||
{ "field" : "__REALTIME_TIMESTAMP" },
|
||||
" ",
|
||||
{ "field" : "__MONOTONIC_TIMESTAMP" },
|
||||
" ",
|
||||
|
@ -729,14 +730,15 @@
|
|||
"info" : "6",
|
||||
"debug" : "7"
|
||||
},
|
||||
"body-field": "MESSAGE",
|
||||
"value": {
|
||||
"__REALTIME_TIMESTAMP" : { "kind": "integer" },
|
||||
"__MONOTONIC_TIMESTAMP" : { "kind": "integer", "hidden": true },
|
||||
"__MONOTONIC_TIMESTAMP" : { "kind": "integer" },
|
||||
"_SYSTEMD_UNIT" : { "kind": "string", "identifier" : true },
|
||||
"SYSLOG_IDENTIFIER" : { "kind": "string", "identifier" : true },
|
||||
"_PID" : { "kind": "integer" },
|
||||
"PRIORITY": { "kind": "string", "identifier" : true },
|
||||
"MESSAGE": { "kind": "string", "identifier" : true }
|
||||
"_PID" : { "kind": "integer", "identifier": true },
|
||||
"PRIORITY": { "kind": "string", "identifier" : true, "foreign-key": true },
|
||||
"MESSAGE": { "kind": "string" }
|
||||
}
|
||||
},
|
||||
"katello_log" : {
|
||||
|
|
|
@ -267,16 +267,22 @@ void field_overlay_source::build_field_lines(const listview_curses &lv)
|
|||
this->fos_log_helper.ldh_line_attrs, &logline::L_TIMESTAMP);
|
||||
|
||||
curr_tv = this->fos_log_helper.ldh_line->get_timeval();
|
||||
if (this->fos_log_helper.ldh_line->is_time_skewed() && time_range.lr_end != -1) {
|
||||
if (ll->is_time_skewed() && time_range.lr_end != -1) {
|
||||
const char *time_src = this->fos_log_helper.ldh_msg.get_data() +
|
||||
time_range.lr_start;
|
||||
struct timeval actual_tv;
|
||||
date_time_scanner dts;
|
||||
struct exttm tm;
|
||||
|
||||
dts.set_base_time(format->lf_date_time.dts_base_time);
|
||||
if (format->lf_date_time.scan(time_src, time_range.length(),
|
||||
format->get_timestamp_formats(),
|
||||
&tm, actual_tv,
|
||||
false)) {
|
||||
false) ||
|
||||
dts.scan(time_src, time_range.length(),
|
||||
nullptr,
|
||||
&tm, actual_tv,
|
||||
false)) {
|
||||
sql_strftime(orig_timestamp, sizeof(orig_timestamp), actual_tv, 'T');
|
||||
time_str.append("; Actual Time: ");
|
||||
time_lr.lr_start = time_str.length();
|
||||
|
|
|
@ -425,6 +425,7 @@ DISTCLEANFILES = \
|
|||
logfile_stdin.log \
|
||||
logfile_syslog.0 \
|
||||
logfile_syslog_fr.0 \
|
||||
logfile_syslog_with_mixed_times.0 \
|
||||
unreadable.log \
|
||||
empty \
|
||||
scripts-empty
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
#! /bin/bash
|
||||
|
||||
locale -a
|
||||
cp ${srcdir}/logfile_syslog_fr.0 logfile_syslog_fr.0
|
||||
touch -t 200711030923 logfile_syslog_fr.0
|
||||
run_test env LC_TIME=fr_FR.UTF-8 ${lnav_test} -n \
|
||||
|
|
|
@ -157,11 +157,12 @@ check_error_output "spectrogram worked with unordered log_time?" <<EOF
|
|||
error: no 'log_time' column found or not in ascending order, unable to create spectrogram
|
||||
EOF
|
||||
|
||||
|
||||
cp ${srcdir}/logfile_syslog_with_mixed_times.0 logfile_syslog_with_mixed_times.0
|
||||
touch -t 201511030923 logfile_syslog_with_mixed_times.0
|
||||
run_test ${lnav_test} -n \
|
||||
-c ";select log_time,log_actual_time from syslog_log" \
|
||||
-c ':write-csv-to -' \
|
||||
${test_dir}/logfile_syslog_with_mixed_times.0
|
||||
logfile_syslog_with_mixed_times.0
|
||||
|
||||
check_output "log_actual_time column not working" <<EOF
|
||||
log_time,log_actual_time
|
||||
|
|
Loading…
Reference in New Issue