This is the juiciest component of the loggers. The PR is responsible for filtering incoming value to log or ignore based on the rules.
Rule 1. Filtering by tag. The incoming log(value, tag, log_type), will be filtered if the tag from arg does not match with any of the tag from the config (inside config.yaml) inside the root logger. The tag in the config can be a regex.
Rule 2. Filtering by the number of encounters of {log_type}.{tag}.{func} for each system, metric, performance root logger after rule 1 passes. The incoming log(value, tag, log_type), may be called many times. We dont want to log every logger call. Based on the freq value in the config file, ignore any call number that is not a multiple of freq.
Please review https://github.com/neuralmagic/deepsparse/pull/1533 and https://github.com/neuralmagic/deepsparse/pull/1537 first
Desctiption:
This is the juiciest component of the loggers. The PR is responsible for filtering incoming value to log or ignore based on the rules.
Rule 1. Filtering by tag. The incoming
log(value, tag, log_type)
, will be filtered if the tag from arg does not match with any of the tag from the config (inside config.yaml) inside the root logger. The tag in the config can be a regex. Rule 2. Filtering by the number of encounters of {log_type}.{tag}.{func} for each system, metric, performance root logger after rule 1 passes. The incominglog(value, tag, log_type)
, may be called many times. We dont want to log every logger call. Based on thefreq
value in the config file, ignore any call number that is not a multiple offreq
.Usage:
Check tests