Skip to content

Conversation

@jamesbornholt
Copy link
Member

Description of change

We disabled logging to a file by default in #373. But we'd still like to have a default home for high-severity messages, which is exactly what syslog is for.

This PR is the bare minimum to get tracing-style structured logging into syslog. I hardcoded the verbosity to warn,awscrt=off and didn't think too hard about configuration: the syslog logger is on whenever the --log-directory flag isn't set. Because I didn't think too hard about it, I also didn't update docs/LOGGING.md yet.

This PR is two commits:

  1. Move the logging module from main.rs to its own file, just because it was getting big. No other code changes here.
  2. Actually implement the syslog logger and plumb it into logging.rs.

Does this change impact existing behavior?

No.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

No code changes, just relocating the module in preparation for the next
commit.

Signed-off-by: James Bornholt <[email protected]>
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 18, 2023 05:25 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 18, 2023 05:25 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 18, 2023 05:25 — with GitHub Actions Inactive
@dannycjones
Copy link
Contributor

Plan to finish review here tomorrow morning. Needed to learn a bit about syslog and tracing_subscriber layers.

Signed-off-by: James Bornholt <[email protected]>
Signed-off-by: James Bornholt <[email protected]>
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 18, 2023 20:02 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 18, 2023 20:02 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 18, 2023 20:02 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 18, 2023 21:25 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 18, 2023 21:25 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 18, 2023 21:25 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 18, 2023 21:25 — with GitHub Actions Inactive
Copy link
Contributor

@dannycjones dannycjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks James, this looks great and I'm glad to have this as the default if logging is not configured. The additional comments in the last commit also helped a lot.

The main concern I have is that it will become a file that most will not want to touch, so I'd like to make it as accessible as possible. The comments are along these lines.

Signed-off-by: James Bornholt <[email protected]>
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 16:01 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 16:01 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 16:01 — with GitHub Actions Inactive
@jamesbornholt jamesbornholt temporarily deployed to PR integration tests July 19, 2023 16:01 — with GitHub Actions Inactive
Copy link
Contributor

@dannycjones dannycjones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Thanks for the updated comments, very clear.

@jamesbornholt jamesbornholt added this pull request to the merge queue Jul 20, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Jul 20, 2023
@dannycjones dannycjones added this pull request to the merge queue Jul 20, 2023
Merged via the queue into awslabs:main with commit 7bbc21a Jul 20, 2023
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.

2 participants