Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -396,8 +396,13 @@ protected void doConfigureWithTerminalWithRawStreamsEnabled(C context) {
protected void doConfigureWithTerminalWithRawStreamsDisabled(C context) {
MavenSimpleLogger stdout = (MavenSimpleLogger) context.loggerFactory.getLogger("stdout");
MavenSimpleLogger stderr = (MavenSimpleLogger) context.loggerFactory.getLogger("stderr");
stdout.setLogLevel(LocationAwareLogger.INFO_INT);
stderr.setLogLevel(LocationAwareLogger.INFO_INT);
int streamLogLevel = switch (context.loggerLevel) {
case DEBUG -> LocationAwareLogger.DEBUG_INT;
case INFO -> LocationAwareLogger.INFO_INT;
case ERROR -> LocationAwareLogger.ERROR_INT;
};
stdout.setLogLevel(streamLogLevel);
stderr.setLogLevel(streamLogLevel);
PrintStream psOut = new LoggingOutputStream(s -> stdout.info("[stdout] " + s)).printStream();
context.closeables.add(() -> LoggingOutputStream.forceFlush(psOut));
PrintStream psErr = new LoggingOutputStream(s -> stderr.warn("[stderr] " + s)).printStream();
Expand Down