Skip to content

chore(examples): add syslog friendly format#174

Merged
mainrs merged 1 commit into
rust-cli:masterfrom
mainrs:example_syslog
Jul 24, 2020
Merged

chore(examples): add syslog friendly format#174
mainrs merged 1 commit into
rust-cli:masterfrom
mainrs:example_syslog

Conversation

@mainrs

@mainrs mainrs commented Jul 24, 2020

Copy link
Copy Markdown
Contributor

Closes #157

@mainrs

mainrs commented Jul 24, 2020

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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