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

spire: switch logs to include nanoseconds #5798

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

Conversation

sorindumitru
Copy link
Contributor

It makes a bit easier to look at the timing of things inside the server and agent.

Logs would look like this with the option:

time="2025-01-20T07:56:05.612518Z" level=info msg="Using legacy downstream X509 CA TTL calculation by default; this default will change in a future release"
time="2025-01-20T07:56:05.612897Z" level=warning msg="Current umask 0022 is too permissive; setting umask 0027"
time="2025-01-20T07:56:05.612988Z" level=info msg=Configured admin_ids="[]" data_dir=./.data launch_log_level=debug version=1.11.2-dev-unk
time="2025-01-20T07:56:05.613071Z" level=info msg="Opening SQL database" db_type=sqlite3 subsystem_name=sql
time="2025-01-20T07:56:05.614333Z" level=debug msg="Code and DB schema versions are the same. No migration needed" schema=23 subsystem_name=sql version_info=1.11.2-dev-unk

There's a bit of annoyance with the default formatter. If we override something in there, it annoys a test for NewServerConfig. That one I think that it verifies that external users of NewServerConfig can override the log config. So for now I kept it without nanoseconds.

Pull Request check list

  • Commit conforms to CONTRIBUTING.md?
  • Proper tests/regressions included?
  • Documentation updated?

Affected functionality
logging

Description of change
include the nanoseconds with timestamps in logs

It makes a bit easier to look at the timing of things inside the server and agent.

Signed-off-by: Sorin Dumitru <sdumitru@bloomberg.net>
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.

1 participant