Skip to content
Snippets Groups Projects
Commit 53c8874f authored by John Harris's avatar John Harris
Browse files

fix: resolve logs not always being immediately visible in dev

parent 0f22cbc8
No related branches found
Tags 1.7.3
No related merge requests found
Pipeline #39955 passed
......@@ -63,6 +63,9 @@ module NexusSemanticLogger
end
logger.info('SemanticLogger initialised in development.', level: config.log_level)
# Ensure logging is immediately flushed.
$stdout.sync = true
end
def self.test(config)
......@@ -70,6 +73,9 @@ module NexusSemanticLogger
config.semantic_logger.clear_appenders!
color_appender = config.semantic_logger.add_appender(io: $stdout, formatter: :color)
color_appender.filter = NexusSemanticLogger::AppenderFilter.filter_lambda
# Ensure logging is immediately flushed.
$stdout.sync = true
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment