{"action":"closed","issue":{"url":"https://api.github.com/repos/sebasmagri/env_logger/issues/108","repository_url":"https://api.github.com/repos/sebasmagri/env_logger","labels_url":"https://api.github.com/repos/sebasmagri/env_logger/issues/108/labels{/name}","comments_url":"https://api.github.com/repos/sebasmagri/env_logger/issues/108/comments","events_url":"https://api.github.com/repos/sebasmagri/env_logger/issues/108/events","html_url":"https://github.com/sebasmagri/env_logger/issues/108","id":376938459,"node_id":"MDU6SXNzdWUzNzY5Mzg0NTk=","number":108,"title":"changing target to stdout did not take effect?","user":{"login":"sallyyu0","id":36087583,"node_id":"MDQ6VXNlcjM2MDg3NTgz","avatar_url":"https://avatars0.githubusercontent.com/u/36087583?v=4","gravatar_id":"","url":"https://api.github.com/users/sallyyu0","html_url":"https://github.com/sallyyu0","followers_url":"https://api.github.com/users/sallyyu0/followers","following_url":"https://api.github.com/users/sallyyu0/following{/other_user}","gists_url":"https://api.github.com/users/sallyyu0/gists{/gist_id}","starred_url":"https://api.github.com/users/sallyyu0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sallyyu0/subscriptions","organizations_url":"https://api.github.com/users/sallyyu0/orgs","repos_url":"https://api.github.com/users/sallyyu0/repos","events_url":"https://api.github.com/users/sallyyu0/events{/privacy}","received_events_url":"https://api.github.com/users/sallyyu0/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-11-02T19:23:51Z","updated_at":"2018-11-12T00:18:21Z","closed_at":"2018-11-12T00:18:21Z","author_association":"NONE","body":"Hello,\r\n\r\nI'm changing println! to info! when using the env_logger and trying to change target to stdout. However it does not seem to make any different. All logs still go to console. Is not it supposed to be different? \r\n\r\nCargo.toml:\r\n\r\n[dependencies]\r\nlog = \"0.4\"\r\nenv_logger = \"0.5\"\r\n\r\nlib.rs:\r\n\r\nextern crate log;\r\nextern crate env_logger;. \r\n\r\nlogger.rs\r\nextern crate log;\r\nextern crate env_logger;\r\n\r\nuse std::env;\r\nuse log::*;\r\nuse self::env_logger::{Builder, Target};\r\n\r\n    ::std::env::set_var(\"RUST_LOG\", \"info\");\r\nprintln!(\"env RUST_LOG as {:?}\", env::var(\"RUST_LOG\"));\r\n\r\n    let mut builder = Builder::new();\r\n    builder.target(Target::Stdout);\r\n    if env::var(\"RUST_LOG\").is_ok() {\r\n        builder.parse(&env::var(\"RUST_LOG\").unwrap());\r\n    }\r\n    builder.init();\r\n    info!(\"builder={:?}\", builder);\r\n\r\nNote that I did get following error and not sure why So I made change as instructed by adding \"self\", it passed.\r\n\r\n8 | use env_logger::{Builder, Target};\r\n  |     ^^^^^^^^^^ Did you mean `self::env_logger`?\r\n\r\n==========================\r\nHere is the output of cargo run as well as docker run:\r\n\r\nenv RUST_LOG as Ok(\"info\")\r\n INFO 2018-11-02T19:17:37Z: myapp::utils::logger: builder=Logger { filter: Filter { filter: None, directives: [] }, writer: Logger { target: Stdout, write_style: Auto } }\r\n\r\n\r\n   "}}
{"actor":{"display_login":"KodrAus"}}