Closed jmarrec closed 9 months ago
Given this call: LOG_FREE(Debug, "Channel", "MSG")
Current behavior:
# C++
[Channel] <-1> MSG
# Ruby's run.log
[11:12:13.123456 DEBUG] MSG
Proposed, when running a workflow:
# Proposed
# Stdout
[Channel] <Debug> MSG
# run.log
[11:12:13.123456 DEBUG] [Channel] MSG
Additional question: do we need a switch to use the old run.log format or just set the behavior?
thoughts please?
I like the proposed format [11:12:13.123456 DEBUG] [Channel] MSG
without a switch. Would that be ok for everyone? @shorowit @joseph-robertson
Issue overview
Prompted by the fact that the run.log looks quite different between the classic (Ruby) and the C++ CLI.
Additionally, the default formatter is not great. The use of Integers for the log level is unnecessarily confusing. I think I know how to turn the LogLevel enum into a string (eg: "Debug" instead of
-1
)https://github.com/NREL/OpenStudio/blob/3f35a4ce446e1e91a4ec0c559aeca226b2715099/src/utilities/core/LogSink.cpp#L126-L131
Current Behavior
C++
Ruby:
Expected Behavior
Steps to Reproduce
1. 2. 3. 4.
Possible Solution
Details
Environment
Some additional details about your environment for this issue (if relevant):
Context