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

[base-node] Create minimal log4rs sample for seed nodes #2705

Merged
merged 1 commit into from Mar 3, 2021

Conversation

delta1
Copy link
Contributor

@delta1 delta1 commented Feb 26, 2021

Description

  • Adds a new log4rs sample with only warn + error logged to base_layer.log.
  • Also logs periodic status messages to a new status.log file.
  • Rolled logs for base_layer and status moved into rolled sub-folder.
  • Moves info logging into a separate sub-folder named extra.

This way the minimal important information from base_layer.log and status.log can be sent to a log aggregator service, while the extra folder can stay local for debugging if necessary.

Also slightly cleans up the default base node sample, and reduces the level of some very frequent messages in wallet base node service.

Motivation and Context

Default base node logs are too noisy for log aggregation

How Has This Been Tested?

tari_base_node --log-config log4rs_sample_seed_node.yml

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Feature refactor (No new feature or functional changes, but performance or technical debt improvements)
  • New Tests
  • Documentation

Checklist:

  • I'm merging against the development branch.
  • I ran cargo-fmt --all before pushing.
  • I ran cargo test successfully before submitting my PR.
  • I have squashed my commits into a single commit.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.

@leet4tari
Copy link
Contributor

leet4tari commented Feb 26, 2021

Please can we change the rolled logs or at leave the collected rolled logs - pattern: "log/base-node/status.{}.log" to pattern: "log/base-node/rolled.status.{}.log" , else we need to list each log to collect vs using a glob like *.log for collection?

pattern: "log/base-node/base_layer.{}.log" to pattern: "log/base-node/rolled/base_layer.{}.log"

Adds a new log4rs sample with only warn + error logged to
base_layer.log. Also logs periodic status messages to a new status.log
file. Moves info logging into a separate sub-folder named "extra". This
way the minimal important information from base_layer.log and status.log
can be sent to a log aggregator service, while the extra folder can stay
local and hang around for debugging if necessary. Also slightly clean up
the default base node sample.
@delta1
Copy link
Contributor Author

delta1 commented Feb 27, 2021

@leet4tari done - rolled logs for base_layer.log and status.log will be moved into rolled folder, so only the current base_layer.log and status.log will be in the log/base-node folder. Suitable?

@stringhandler stringhandler merged commit f44bbee into tari-project:development Mar 3, 2021
@delta1 delta1 deleted the log4rs-seed-node branch March 3, 2021 14:42
@stringhandler stringhandler mentioned this pull request Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants