fix: allocate console and set stderr to 2 for subsequent logging#19
fix: allocate console and set stderr to 2 for subsequent logging#19pzhlkj6612 wants to merge 1 commit intoshmocz:developfrom
Conversation
|
Putting things in header file is painful, so the current code looks that awkward. |
|
Well, I may need to create a "logging.cpp"... Are our executables able to use that? |
|
Thanks! The problem has been mitigated in 4141a82. Technically it doesn't fix writing to At the moment, I'm not sure if the benefits from this fix outweigh the added complexity:
|
|
Thank you for the detailed reply. Let me explain:
Hmm, we are trying to use CUI in a GUI program (i.e., the game). that's normal and natural on Linux, but a bit inconvenient on Windows:
I'm sorry I haven't run any tests until now. I guess those tests are able to run without a game. Hence, I need to make things more clear, that is:
We can define the behaviour. I think we can support both two log sinks. For example:
It should be fine if their implementation is the same as "CnCNet/yr-patches". 1 Subsequent Unfortunately, Phobos' implementation may need to be modified before using my new code if they allocate console after us. 2 I haven't digged into Phobos, though.
Let me refactor my new code based on the latest codebase. I need to redesign it. It deserves a fix. Furthermore, recently I also did something about Footnotes
|
For this issue:
Please test!
Refs:
.