Package: logger_pkg

Constants

Name Type Value Description
null_logger logger_t (p_data => null_ptr)
no_time_check time -1 ns Constant to ignore time value when checking log call

Types

Name Type Description
logger_t
logger_vec_t array (natural range <>) of logger_t

Functions

Description

Log procedures for each log level

Description
Log procedure with level as argument

Description
Set the threshold for stopping simulation for a specific log level and
logger tree

Description
Disable stopping simulation for a specific log level and
logger tree

Description
Set the threshold for stopping simulation for a specific log level in
the entire logging tree.
NOTE: Removes all other stop count settings for log_level in entire tree.

Description
Disable stopping simulation for a specific log level in
the entire logging tree.
NOTE: Removes all other stop count settings for log_level in entire tree.

Description
Shorthand for configuring the stop counts for (warning, error, failure) in
a logger subtree. Set stop count to infinite for all levels < log_level and 1 for all (warning, error, failure) >= log_level.
NOTE: Removes all other stop count settings from logger subtree.

Description
Shorthand for configuring the stop counts in entire logger tree.
Same behavior as set_stop_level for specific logger subtree above

Description
Unset stop count for stopping simulation for a specific log level and
logger tree

Description
Disable a log_level from specific logger including all children.
Disable is used when a log message is unwanted and it should be ignored.
NOTE: A disabled log message is still counted to get a disabled log count
statistics.
errors and failures can be disabled but the final_log_check must
explicitly allow it as well as an extra safety mechanism.

Description
Hide log messages of specified level to this handler.

Description
Hide log messages from the logger of the specified level to this handler

Description
Hide log messages of the specified levels to this handler.

Description
Hide log messages from the logger of the specified levels to this handler

Description
Show log messages of the specified log_level to this handler

Description
Show log messages from the logger of the specified log_level to this handler

Description
Show log messages of the specified log_levels to this handler

Description
Show log messages from the logger of the specified log_levels to this handler

Description
Show all log levels to the log handler

Description
Show all log levels to the handler from specific logger

Description
Hide all log levels from this handler

Description
Hide all log levels from this handler from specific logger

Description
Set the log handlers for this logger

Description
Reset the log call count of a specific level or all levels when level = null_log_level

Description
Perform a check of the log counts and fail unless there are no errors or failures.
By default no disabled errors or failures are not allowed.
Disabled errors and failrues can be allowed by setting the corresponding
arguments to true.
By default warnings are allowed but failure on warning can be enabled.
When fail on warning is enabled it also allows disabled warnings.

Description

Mock procedures to enable unit testing of code performing logging

Mock the logger preventing simulaton abort and recording all logs to it

Description
Mock log_level of logger preventing simulaton abort and recording all logs to it

Description
Unmock the logger returning it to its normal state
Results in failures if there are still unchecked log calls recorded

Description
Check that the earliest recorded log call in the mock state matches this
call or fails. Also consumes this recorded log call such that subsequent
check_log calls can be used to verify a sequence of log calls

Description
Check that there is only one recorded log call remaining

Description
Check that there are no remaining recorded log calls, automatically called
during unmock