Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[log] Enable domain based level configuration #3229

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gstaa
Copy link
Contributor

@gstaa gstaa commented May 24, 2024

Existing behavior:

All the installed domains get the INFO default level initially (OGS_LOG_DEFAULT = OGS_LOG_INFO).

At startup the configured level is considered:

  • for all domains if there is no domain specified,
  • for listed domains only;

Domain based level configuration:

Each listed domain under domain section can have a specific level defined.

Example of domain configuration for AMF:

logger:
  level: trace
  domain: "core:fatal, sbi:error, amf, dbi:debug"

Causes the following levels:

  • core: fatal
  • mem: info - not listed, so the default is used!
  • sock: info
  • event: info
  • thread: info
  • tlv: info
  • app: info
  • metrics: info
  • sbi: error
  • sctp: info
  • ngap: info
  • nas: info
  • amf: trace - the level is not specified, so the top level is inherited!
  • gmm: info
  • dbi: debug

Legal delimiters are " \t\n,:". All of them can be used, but for the sake of clarity, ":" is recommended to separate module and its level.

Installing a new domain with the name equal to one of the levels would disable this level from being configured per domain.

Existing behavior:

All the installed domains get the INFO dafault level
initially (OGS_LOG_DEFAULT = OGS_LOG_INFO).

At startup the configured level is considered:
- for all domains if there is no domain specified,
- for listed domains only;

Domain based level configuration:

Each listed domain under domain section can have a
specific level defined.

Example of domain configuration for AMF:
```
logger:
  level: trace
  domain: "core:fatal, sbi:error, amf, dbi:debug"
```
Causes the following levels:
- core: fatal
- mem: info - not listed, so the default is used!
- sock: info
- event: info
- thread: info
- tlv: info
- app: info
- metrics: info
- sbi: error
- sctp: info
- ngap: info
- nas: info
- amf: trace - the level is not specified, so the top level is inherited!
- gmm: info
- dbi: debug

Legal delimiters are " \t\n,:". All of them can be used,
but for the sake of clarity, ":" is recommended to
separate module and its level.
@gstaa gstaa force-pushed the gh_log_per_module branch from 36c7415 to 9a7795d Compare May 24, 2024 10:09
@acetcom acetcom added the type:wontfix Indicates that work won't continue on an issue, pull request, or discussion label May 26, 2024
Copy link

As there has been no recent activity on this PR, it has been marked as stale. It will be automatically closed if no further action is taken.

@github-actions github-actions bot added the Stale label Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Stale type:wontfix Indicates that work won't continue on an issue, pull request, or discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants