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

chore(examples): add syslog friendly format #174

Merged
merged 1 commit into from Jul 24, 2020

Conversation

mainrs
Copy link
Contributor

@mainrs mainrs commented Jul 24, 2020

Closes #157

@mainrs
Copy link
Contributor Author

mainrs commented Jul 24, 2020

Lint fail expected and knowingly ignored :p

@mainrs mainrs merged commit b8c3754 into rust-cli:master Jul 24, 2020
@mainrs mainrs deleted the example_syslog branch July 24, 2020 15:37
Comment on lines +4 to +5
match std::env::var("RUST_LOG_STYLE") {
Ok(s) if s == "SYSTEMD" => env_logger::builder()
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
match std::env::var("RUST_LOG_STYLE") {
Ok(s) if s == "SYSTEMD" => env_logger::builder()
match std::env::var_os("RUST_LOG_STYLE").as_deref() {
Some(b"SYSTEMD") => env_logger::builder()

because env::var is lame 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Feels more natural, totally true. Would you mind changing it in a PR? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I did just merge it as it seemed trivial. Should have waited :)

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.

Systemd format support
2 participants