Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanwbrei committed Sep 27, 2024
1 parent f29a93a commit 9a1d2e1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/libraries/JANA/JApplication.cc
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ void JApplication::Initialize() {

// Set logger on JApplication itself
m_logger = m_params->GetLogger("jana");
m_logger.show_classname = false;

if (m_logger.level > JLogger::Level::INFO) {
std::ostringstream oss;
Expand Down
4 changes: 2 additions & 2 deletions src/libraries/JANA/JLogger.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ struct JLogMessage {
// Extract milliseconds by calculating the duration since the last whole second
auto milliseconds = std::chrono::duration_cast<std::chrono::milliseconds>(now.time_since_epoch()) % 1000;
builder << buffer << ".";
builder << std::setfill('0') << std::setw(5) << milliseconds << std::setfill(' ') << " ";
builder << std::setfill('0') << std::setw(3) << milliseconds.count() << std::setfill(' ') << " ";
}
if (logger.show_level) {
switch (level) {
Expand All @@ -96,7 +96,7 @@ struct JLogMessage {
builder << std::this_thread::get_id() << " ";
}
if (logger.show_group) {
builder << logger.group << ": ";
builder << "[" << logger.group << "] ";
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/libraries/JANA/Services/JParameterManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ JLogger JParameterManager::GetLogger(const std::string& component_prefix) {
bool enable_timestamp = RegisterParameter("jana:log:show_timestamp", true, "Show timestamp in log output");
auto enable_threadstamp = RegisterParameter("jana:log:show_threadstamp", false, "Show threadstamp in log output");
auto enable_group = RegisterParameter("jana:log:show_group", false, "Show threadstamp in log output");
auto enable_level = RegisterParameter("jana:log:show_level", false, "Show threadstamp in log output");
auto enable_level = RegisterParameter("jana:log:show_level", true, "Show threadstamp in log output");

if (component_prefix.empty()) {
logger.level = global_log_level;
Expand Down

0 comments on commit 9a1d2e1

Please sign in to comment.