Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
nexus_semantic_logger
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Public
nexus_semantic_logger
Commits
19960cb2
Commit
19960cb2
authored
2 years ago
by
John Harris
Browse files
Options
Downloads
Patches
Plain Diff
docs: document log appender filter features
parent
784c306f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#40810
failed
2 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+38
-1
38 additions, 1 deletion
README.md
with
38 additions
and
1 deletion
README.md
+
38
−
1
View file @
19960cb2
...
...
@@ -9,7 +9,44 @@ As well as providing a semantic logger, this gem handles datadog telemetry assoc
*
logs
*
traces
*
metrics
*
statsd is automatically attached to datadog runtime metrics and may also be used for custom metrics.
*
statsd is automatically attached to datadog runtime metrics and may also be used for custom metrics.
### Customise log level per logger
For example, to show debug logging for
`MySubscriber`
while having all other logs on info.
```
# The log level must be set to the lowest level which can be dynamically controlled.
LOG_LEVEL=DEBUG
# The default level for filtered logs.
LOG_NAMES_DEFAULT_LEVEL=INFO
# Per level overrides for filtered logs.
LOG_NAMES_DEBUG=MySubscriber
```
*
Customised log names are available for each level e.g.
`LOG_NAMES_TRACE`
*
Log names are matched on prefix.
*
Multiple log names are supported via comma separated values.
### Changing log level dynamically
The default level for filtered logs (
`LOG_NAMES_DEFAULT_LEVEL`
) may be changed on a running instance with the
`WINCH`
signal. This cycles through the available levels
`[trace debug info warn error fatal]`
.
Note that you cannot dynamically enable a level lower than the
`LOG_LEVEL`
. Instead the env var must be adjusted and the
instance restarted.
Send signal:
`pkill --signal WINCH --count --full "^puma.*"`
Instance output:
`WINCH signal changed LOG_NAMES_DEFAULT_LEVEL from debug to info`
### Querying current log level
The
`SYS`
signal will print the levels used by the running instance.
Send signal:
`pkill --signal SYS --count --full "^puma.*"`
Instance output:
`SYS signal reports LOG_LEVEL=debug LOG_NAMES_DEFAULT_LEVEL=warn`
### Sending metrics
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment