-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #5037 - Adjust log formatters for workflow (stdout + run.log) #5042
Conversation
…for run.log so it looks like the openstudio-workflow-gem
…e same run.log fmt
ad04df7
to
95b6572
Compare
// TODO: ideally we want stdErr logger to always receive Error and Fatal | ||
// and stdOut logger should receive all the others. This is definitely doable (cf LogSink::updateFilter) but now is not the time. | ||
if (!m_show_stdout) { | ||
openstudio::Logger::instance().standardOutLogger().disable(); | ||
} else if (workflowJSON.runOptions()->debug()) { | ||
openstudio::Logger::instance().standardOutLogger().setLogLevel(Error); // Still show errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If --show-stdout
not passed, still show Error and Fatals + leave a TODO to clean up later.
LogLevel targetLogLevel = oriLogLevel; | ||
if (workflowJSON.runOptions()->debug() && oriLogLevel > Debug) { | ||
targetLogLevel = Debug; | ||
} | ||
|
||
openstudio::Logger::instance().addTimeStampToLogger(); // Needed for run.log formatting | ||
openstudio::Logger::instance().standardOutLogger().setFormatter(&standardFormatterWithStringSeverity); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stdout: [Channel] <Debug> MSG
constexpr bool use_workflow_gem_fmt = true; | ||
constexpr bool include_channel = true; // or workflowJSON.runOptions()->debug(); | ||
logFile.useWorkflowGemFormatter(use_workflow_gem_fmt, include_channel); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run.log: [11:12:13.123456 DEBUG] [Channel] MSG
Same as the Old Ruby CLI, but with the channel in addition
Example:
|
CI Results for d7a232f:
|
Pull request overview
Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.