call logs
Description:
Sends a GET request to the /manage/v2/logs endpoint
Usage:
call logs [options]
Options:
-e, --environment=ENVIRONMENT The ML Client environment name [default: "local"]
-a, --app-server=APP-SERVER The App-Server (port) to get logs of
-s, --rest-server=REST-SERVER The ML REST Server environmental id (to get logs from)
-l, --log-type=LOG-TYPE MarkLogic log type (error, access or request) [default: "error"]
-f, --from=FROM A start time to search error logs
-t, --to=TO n end time to search error logs
-r, --regex=REGEX A regex to search error logs
-H, --host=HOST The host from which to return the log data.
--list If set, no filename will be passed to the Logs REST API
-h, --help Display help for the given command. When no command is given display help for the list command.
-q, --quiet Do not output any message.
-V, --version Display this application version.
--ansi Force ANSI output.
--no-ansi Disable ANSI output.
-n, --no-interaction Do not ask any interactive question.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
List log file names
ml call logs --list
Get all logs
8002_ErrorLog.txt
ml call logs -a 8002
8002_ErrorLog.txt
ml call logs -a 8002 -l error
8002_AccessLog.txt
ml call logs -a 8002 -l access
8002_RequestLog.txt
ml call logs -a 8002 -l request
ErrorLog.txt
ml call logs
TaskServer_ErrorLog.txt
ml call logs -a TaskServer
TaskServer_ErrorLog.txt
ml call logs -a 0
Get limited logs
Note
--from, --to and --regex parameters work only for error logs
Time frames
ml call logs -a 8002 -f 10:00
ml call logs -a 8002 -t 12:00
ml call logs -a 8002 -f 10:00 -t 12:00
ml call logs -a 8002 -f 2024-02-01 -t 2024-02-03
ml call logs -a 8002 -f '2024-02-01 10:00' -t 2024-02-03
RegEx
ml call logs -a 8002 -r 'Forest Meters'
ml call logs -a 8002 -r 'Forest M.*'
ml call logs -a 8002 -r 'Memory [^1]{1,2}%'
ml call logs -a 8002 -f 2024-02-01 -t 2024-02-03 -r 'Memory [^1]{1,2}%'