env_logger
env_logger copied to clipboard
can't see any logs when using #[windows_subsystem = "windows"]
Maybe related: #214.
I don't know if we can do anything about it, but I just wasted 10 minutes understanding why my logs no longer worked under Windows. It might be good to mention it in the docs.
work around, while not being perfect (only working on debug target):
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
So if I understand correctly, windows_subsystem = "windows" means no stdout / stderr is created.
Maybe I don't do enough Windows programming lately but I would assume that setting this is a fairly advanced use case, meaning
- It would be uncommon enough that documenting might make things more confusing
- There is a certain level of base understanding expected when using this
- Obviously, this fails since you are here but wanting to lay out my assumptions so I can better understand why I'm wrong.
Could you help me in finding where my understanding is wrong?
I only use this so that no console pops when launching my program (i'm doing a graphical interface). AFIK, it's the only ways to have this behavior on Windows, so every graphical program will want to use this i think. For example, i know Tauri use it in it's examples
It would be uncommon enough that documenting might make things more confusing
I understand that, it's as you want, maybe having one issue is enought
Ah, guis, so this isn't just an advanced issue.