{"action":"created","issue":{"url":"https://api.github.com/repos/rust-lang/log/issues/39","labels_url":"https://api.github.com/repos/rust-lang/log/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/rust-lang/log/issues/39/comments","events_url":"https://api.github.com/repos/rust-lang/log/issues/39/events","html_url":"https://github.com/rust-lang/log/issues/39","id":74753766,"number":39,"title":"Error! logging on Windows x64 Rust prints nothing without env variable","user":{"login":"Velocity-","id":3662930,"avatar_url":"https://avatars.githubusercontent.com/u/3662930?v=3","gravatar_id":"","url":"https://api.github.com/users/Velocity-","html_url":"https://github.com/Velocity-","followers_url":"https://api.github.com/users/Velocity-/followers","following_url":"https://api.github.com/users/Velocity-/following{/other_user}","gists_url":"https://api.github.com/users/Velocity-/gists{/gist_id}","starred_url":"https://api.github.com/users/Velocity-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Velocity-/subscriptions","organizations_url":"https://api.github.com/users/Velocity-/orgs","repos_url":"https://api.github.com/users/Velocity-/repos","events_url":"https://api.github.com/users/Velocity-/events{/privacy}","received_events_url":"https://api.github.com/users/Velocity-/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-09T20:34:15Z","updated_at":"2015-05-19T04:54:25Z","closed_at":"2015-05-13T07:20:32Z","body":"The example tells me:\r\n\r\n`Log levels are controlled on a per-module basis, and by default all logging is disabled except for error!`\r\n\r\nHowever, when I copy the example...\r\n\r\n```\r\n#[macro_use]\r\nextern crate log;\r\nextern crate env_logger;\r\n\r\nfn main() {\r\n\tenv_logger::init().unwrap();\r\n\terror!(\"this is printed by default\\n\");\r\n}\r\n```\r\n\r\n.. and `cargo build` it (successfully) and then `cargo run` it, the console prints nothing. However, once I type this in the cmd window:\r\n\r\n`@set RUST_LOG=ERROR`\r\n\r\neverything works fine. I'm not sure if this is intended to be this way, but if I read the example description I'd assume this is a bug.\r\n\r\nEnvironment:\r\nWindows 8.1 64-bit\r\nRustc 1.0.0-beta.4 (850151a75 2015-04-30) (built 2015-05-01)\r\nCargo 0.2.0-nightly (efb482d 2015-04-30) (built 2015-04-30)\r\n\r\nCargo dependencies:\r\n`[dependencies]\r\nlog = \"0.3.1\"\r\nenv_logger = \"0.3.0\"`\r\n"},"comment":{"url":"https://api.github.com/repos/rust-lang/log/issues/comments/103336480","html_url":"https://github.com/rust-lang/log/issues/39#issuecomment-103336480","issue_url":"https://api.github.com/repos/rust-lang/log/issues/39","id":103336480,"user":{"login":"sfackler","id":1455697,"avatar_url":"https://avatars.githubusercontent.com/u/1455697?v=3","gravatar_id":"","url":"https://api.github.com/users/sfackler","html_url":"https://github.com/sfackler","followers_url":"https://api.github.com/users/sfackler/followers","following_url":"https://api.github.com/users/sfackler/following{/other_user}","gists_url":"https://api.github.com/users/sfackler/gists{/gist_id}","starred_url":"https://api.github.com/users/sfackler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sfackler/subscriptions","organizations_url":"https://api.github.com/users/sfackler/orgs","repos_url":"https://api.github.com/users/sfackler/repos","events_url":"https://api.github.com/users/sfackler/events{/privacy}","received_events_url":"https://api.github.com/users/sfackler/received_events","type":"User","site_admin":false},"created_at":"2015-05-19T04:54:25Z","updated_at":"2015-05-19T04:54:25Z","body":"As a followup, it turns out that the documented behavior was what was actually intended. `env_logger` now outputs error-level log events by default: https://github.com/rust-lang/log/commit/f2aad6bb23636dca801d366eca227ddcafd268a7"}}