You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Examining the Fibratus logs can be a hassle, especially if the end user is not familiar with Powershell. It would be much more convenient if the Fibratus CLI provided the facilities for grepping log files, filtering relevant log messages, etc.
Feature
Expand the Fibratus CLI with a new logs command. The command should ideally provide the following set of modifiers:
-f: tails the log file in realtime as the file gets written by the Fibratus process
-n: shows the last N lines of the log file
-h: shows the first N lines of the log file
-l: filters the log messages by the log level (debug, info, warning, and error)
--grep: accepts the Go-compatible regular expression and applies on each log line. If it produces any match, the log line is shown on the console.
If the command is run without any modifiers, the entire log file is read and dumped on the console.
Examples:
Show last 10 lines and watch for subsequent changes in realtime:
$ fibratus logs -n 10 -f
Filter logs by info level
$ fibratus logs -l info
Additional context
For watching the file changes in realtime, consider the usage of the fsnotify package.
The text was updated successfully, but these errors were encountered:
Motivation
Examining the Fibratus logs can be a hassle, especially if the end user is not familiar with Powershell. It would be much more convenient if the Fibratus CLI provided the facilities for grepping log files, filtering relevant log messages, etc.
Feature
Expand the Fibratus CLI with a new
logs
command. The command should ideally provide the following set of modifiers:-f
: tails the log file in realtime as the file gets written by the Fibratus process-n
: shows the last N lines of the log file-h
: shows the first N lines of the log file-l
: filters the log messages by the log level (debug, info, warning, and error)--grep
: accepts the Go-compatible regular expression and applies on each log line. If it produces any match, the log line is shown on the console.If the command is run without any modifiers, the entire log file is read and dumped on the console.
Examples:
Show last 10 lines and watch for subsequent changes in realtime:
Filter logs by info level
Additional context
For watching the file changes in realtime, consider the usage of the fsnotify package.
The text was updated successfully, but these errors were encountered: