mirror of
https://github.com/tstack/lnav.git
synced 2024-08-17 08:50:41 +03:00
[cleanup] fix a few things
This commit is contained in:
parent
223b6af82f
commit
6132b6a944
1
.gitignore
vendored
1
.gitignore
vendored
@ -32,6 +32,7 @@ missing
|
|||||||
mkinstalldirs
|
mkinstalldirs
|
||||||
test-driver
|
test-driver
|
||||||
docs/build
|
docs/build
|
||||||
|
release/lnav.spec
|
||||||
release/release-NEWS.md
|
release/release-NEWS.md
|
||||||
release/linux-pkg/
|
release/linux-pkg/
|
||||||
release/osx-build-dir/
|
release/osx-build-dir/
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -23,6 +23,8 @@ Features:
|
|||||||
* Added a `:set-text-view-mode` command that controls whether
|
* Added a `:set-text-view-mode` command that controls whether
|
||||||
file contents, such as markdown, are rendered or shown in
|
file contents, such as markdown, are rendered or shown in
|
||||||
their raw state.
|
their raw state.
|
||||||
|
* Added a `pretty_print()` SQL function that provides the same
|
||||||
|
functionality as the PRETTY view.
|
||||||
|
|
||||||
Interface Changes:
|
Interface Changes:
|
||||||
* The "Gantt Chart" view has been renamed to "timeline".
|
* The "Gantt Chart" view has been renamed to "timeline".
|
||||||
|
@ -179,7 +179,6 @@ set(FORMAT_FILES
|
|||||||
formats/openamdb_log.json
|
formats/openamdb_log.json
|
||||||
formats/openstack_log.json
|
formats/openstack_log.json
|
||||||
formats/page_log.json
|
formats/page_log.json
|
||||||
formats/papertrail_log.json
|
|
||||||
formats/pcap_log.json
|
formats/pcap_log.json
|
||||||
formats/procstate_log.json
|
formats/procstate_log.json
|
||||||
formats/redis_log.json
|
formats/redis_log.json
|
||||||
|
@ -702,8 +702,16 @@ execute_file(exec_context& ec, const std::string& path_and_args)
|
|||||||
paths_to_exec.push_back({script_name, "", "", ""});
|
paths_to_exec.push_back({script_name, "", "", ""});
|
||||||
} else if (access(script_name.c_str(), R_OK) == 0) {
|
} else if (access(script_name.c_str(), R_OK) == 0) {
|
||||||
struct script_metadata meta;
|
struct script_metadata meta;
|
||||||
|
auto rp_res = lnav::filesystem::realpath(script_name);
|
||||||
|
|
||||||
meta.sm_path = script_name;
|
if (rp_res.isErr()) {
|
||||||
|
log_error("unable to get realpath() of %s -- %s",
|
||||||
|
script_name.c_str(),
|
||||||
|
rp_res.unwrapErr().c_str());
|
||||||
|
meta.sm_path = script_name;
|
||||||
|
} else {
|
||||||
|
meta.sm_path = rp_res.unwrap();
|
||||||
|
}
|
||||||
extract_metadata_from_file(meta);
|
extract_metadata_from_file(meta);
|
||||||
paths_to_exec.push_back(meta);
|
paths_to_exec.push_back(meta);
|
||||||
} else if (errno != ENOENT) {
|
} else if (errno != ENOENT) {
|
||||||
|
40
src/help.txt
40
src/help.txt
@ -747,14 +747,6 @@ COMMANDS
|
|||||||
type of action to perform (command, SQL query, execute
|
type of action to perform (command, SQL query, execute
|
||||||
script).
|
script).
|
||||||
|
|
||||||
pt-min-time [<date>|<relative-time>]
|
|
||||||
Set/get the minimum time range for any papertrail queries.
|
|
||||||
Absolute or relative time values can be specified.
|
|
||||||
|
|
||||||
pt-max-time [<date>|<relative-time>]
|
|
||||||
Set/get the maximum time range for any papertrail queries.
|
|
||||||
Absolute or relative time values can be specified.
|
|
||||||
|
|
||||||
config <option> [value]
|
config <option> [value]
|
||||||
Set/get the value of a configuration option.
|
Set/get the value of a configuration option.
|
||||||
|
|
||||||
@ -957,38 +949,6 @@ The table allows you to easily use the results of a SQL query in lnav
|
|||||||
commands, which is especially useful when scripting lnav.
|
commands, which is especially useful when scripting lnav.
|
||||||
|
|
||||||
|
|
||||||
PAPERTRAIL INTEGRATION
|
|
||||||
======================
|
|
||||||
|
|
||||||
Papertrail is a log management service with free and paid plans at:
|
|
||||||
|
|
||||||
http://papertrailapp.com
|
|
||||||
|
|
||||||
To configure lnav to communicate with the papertrail service, you will
|
|
||||||
need to set the PAPERTRAIL_API_TOKEN environment variable. You can
|
|
||||||
get your API token from your user profile, available here:
|
|
||||||
|
|
||||||
https://papertrailapp.com/user/edit
|
|
||||||
|
|
||||||
Searching papertrail using lnav can be done by prefixing the search terms
|
|
||||||
with "pt:" and passing the value as a file name. For example, to search
|
|
||||||
for log messages with the string 'Critical Error' when starting lnav you
|
|
||||||
can do the following:
|
|
||||||
|
|
||||||
\$ setenv PAPERTRAIL_API_TOKEN xxxxxxxxx
|
|
||||||
\$ lnav "pt:'Critical Error'"
|
|
||||||
|
|
||||||
If lnav is already started, you can use the ':open' command like so:
|
|
||||||
|
|
||||||
:open pt:'Critical Error'
|
|
||||||
|
|
||||||
If you just want to tail your logs in papertrail, you can pass an empty
|
|
||||||
search string (i.e. "pt:").
|
|
||||||
|
|
||||||
Only one papertrail search can be active at a time. So, if an ':open'
|
|
||||||
is done with a new query, the previous query will be closed first.
|
|
||||||
|
|
||||||
|
|
||||||
CONTACT
|
CONTACT
|
||||||
=======
|
=======
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user