Attention
This version of the SDK has been superseded by the latest release of the SDK.
Unified Logging¶
Unified Logging (UL) utility is aimed at providing an identical logging output, configuration and interaction for different video frameworks provided by AMD AMA Video SDK. Three environmental variables LOG_AMA_CONFIG, LOG_AMA_FILTER and LOG_AMA_FILTER_PERF control interactions with UL. LOG_AMA_CONFIG variable controls the global setting of logging, which includes log destination, max size, log source info, and log levels. LOG_AMA_FILTER variable filters the global configuration and narrows down the logging output to specific software layer, accelerator type or level. LOG_AMA_FILTER_PERF variable controls the flow of performance related logs. The following sections describe the configuration parameters of each variable.
LOG_AMA_CONFIG¶
LOG_AMA_CONFIG is utilized as follows:
export LOG_AMA_CONFIG="[key=value | ...]"
, where key and value are defined as:
key |
value |
Description |
|---|---|---|
destination |
|
Determines the target destination of output logs.
|
log_level |
|
Determines the log level. Defaults to |
perf_log |
|
Enables or disables performance measurements. If enabled, minimal information log level is set. Otherwise, log level is set by Defaults to |
debug_file_name |
|
Enables or disables addition of log file names. Defaults to |
debug_file_line |
|
Enables or disables inclusion of log line numbers. Defaults to |
debug_time_stamp |
|
Enables or disables addition of timestamps. Defaults to |
debug_pid |
|
Enables or disables reporting of process id. Defaults to |
debug_thread |
|
Enables or disables reporting of thread id. Defaults to |
LOG_AMA_FILTER¶
LOG_AMA_FILTER is utilized as follows:
export LOG_AMA_FILTER="[LAYER.ACCEL=log_level | ...]"
, where LAYER and ACCEL are defined as:
LAYER |
Description |
|---|---|
SDK |
Any user space library |
VPI |
Video processing plugins |
XMA |
XMA library |
FFMPEG |
FFmpeg plugins |
GST |
Gstreamer plugins |
GEN |
General and common layers |
XRM |
XRM library |
ACCEL |
Description |
|---|---|
ABR |
ABR ladder |
DEC |
Decoder |
ENC |
Encoder |
GEN |
General hardware logs |
LOG_AMA_FILTER_PERF¶
LOG_AMA_FILTER_PERF is utilized as follows:
export LOG_AMA_FILTER_PERF="[LAYER.ACCEL=log_level | ...]"
, where LAYER and ACCEL are defined as above.
Examples¶
Send output to
log_ama_<pid>_<timestamp>.txtfile, and setlog_levelto warning:export LOG_AMA_CONFIG="destination=file | log_level=WARN | debug_file_line=1 | debug_time_stamp=1 | debug_pid=1 | debug_thread=1 | perf_log=0"
Send output to
/tmp/log_ama.txtfile, and setlog_levelto info:export LOG_AMA_CONFIG="destination=file, location=/tmp/log_ama.txt | log_level=INFO | debug_file_line=1 | debug_time_stamp=1 | debug_pid=1 | debug_thread=1 | perf_log=0"
Send output to
/tmp/log_ama.txtfile, and setlog_levelto info, with max log file size equal to 100MB:export LOG_AMA_CONFIG="destination=file, max_size=100MB, location=/tmp/log_ama.txt | log_level=INFO | debug_file_line=1 | debug_time_stamp=1 | debug_pid=1 | debug_thread=1 | perf_log=0"
Get output on console, with
log_levelset to info:export LOG_AMA_CONFIG="destination=console | log_level=INFO | debug_file_line=1 | debug_time_stamp=1 | debug_pid=1 | debug_thread=1 | perf_log=0"
Assume log_level was
WARNinLOG_AMA_CONFIG, the following filter will additionally enableTRACElog level ofVPIlayer forABRplugins:export LOG_AMA_FILTER=" VPI.ABR=TRACE"
If we want all layers logs for
ABR:export LOG_AMA_FILTER=" *.ABR=TRACE"
If we want all layers logs for
ABR&ENC:export LOG_AMA_FILTER=" *.ABR=TRACE | *.ENC=TRACE"
Force all logs to
ERROR, and generate debug logs fromSDKforABRtype:export LOG_AMA_FILTER=" *.*=ERROR | *.ABR=DEBUG"
Set performance logs to info level:
export LOG_AMA_CONFIG="destination=file, location=log_ama_perf.txt | log_level=WARN | perf_log=1"
Set performance log level to
DEBUGforABRatSDKlayer:export LOG_AMA_FILTER_PERF="SDK.ABR=DEBUG"