Merge Messages from Multiple Debug Logs
You can merge the messages from multiple system logs into one log file. The result is the combined log messages ordered according to the time stamp on the LM_ line.
Before you begin
Copy all debug logs to merge onto the same server.
Procedure
-i
parameter for custom-named logs and the
--input_dir
parameter for default-named
mtx_debug.log files, for example:
- If the logs are named
mtx_debug.log, specify the directories
containing them with the
--input_dir
parameter, for example:kubectl exec -it engine_pod_name -n matrixx -- bash --login -c
"merge_mtx_debug_logs.py --input_dir /var/log/mtx --input_dir /var/log/archive
" - If the logs have custom names, specify their full
pathnames using the
-i
parameter, for example:kubectl exec -it engine_pod_name -n matrixx -- bash --login -c
"merge_mtx_debug_logs.py -i /var/log/mtx/mtx_debug.log.b1 -i /var/log/mtx/mtx_debug.log.b2
" - If some logs are named
mtx_debug.log and some have custom names,
specify the default logs using the
--input_dir
parameter and the custom logs with the-i
parameter, for example:kubectl exec -it engine_pod_name -n matrixx -- bash --login -c
"merge_mtx_debug_logs.py --input_dir /var/log/mtx -i /var/log/mtx/mtx_debug.log.b1 -i /var/log/mtx/mtx_debug.log.b2
"