Skip to content

Commit

Permalink
Address some PR requests
Browse files Browse the repository at this point in the history
1. Log INFO level to CONSOLE by default
2. Change runner's default log level from ERROR to WARN

Took a while to figure out why the correct log level wasn't being passed
to the language server, therefore ignoring the (desired) verbose logs
from the log file.
  • Loading branch information
hubertp committed Sep 19, 2023
1 parent 70d8d20 commit 5b0f20a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion engine/launcher/src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ logging-service {
pattern = "[%level{lowercase=true}] [%d{yyyy-MM-dd'T'HH:mm:ssXXX}] [%logger] %msg%n%nopex"
}
]
default-appender = file
default-appender = console
default-appender = ${?ENSO_APPENDER_DEFAULT}
always-log-to-file = true
always-log-to-file = ${?ENSO_LOG_TO_FILE}
Expand Down
2 changes: 1 addition & 1 deletion engine/runner/src/main/scala/org/enso/runner/Main.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ object Main {

/** Default log level to use if the LOG_LEVEL option is not provided.
*/
val defaultLogLevel: Level = Level.ERROR
val defaultLogLevel: Level = Level.WARN

/** Main entry point for the CLI program.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ final class SerializationManager(compiler: Compiler) {
pool.shutdownNow()
Thread.sleep(100)
compiler.context.logSerializationManager(
debugLogLevel,
Level.WARNING,
"Serialization manager has been shut down."
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static Future<URI> setupServer(
throw new LoggingServiceAlreadySetup();
} else {
if (config.appenders().containsKey(config.appender())) {
currentLevel = logLevel;
currentLevel = config.logToFile() ? Level.TRACE : logLevel;
return Future.apply(
() -> {
var server = LoggingServiceFactory.get().localServerFor(port);
Expand Down
5 changes: 3 additions & 2 deletions lib/scala/project-manager/src/main/resources/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ logging-service {
akka.http = warn
akka.stream = error
akka.routing = error
ch.qos.logback.classic.net.SimpleSocketServer = error
}
appenders = [
{
Expand All @@ -31,7 +32,7 @@ logging-service {
port = ${?ENSO_LOGSERVER_PORT}
},
{
name = "file",
name = "file"
},
{
name = "console"
Expand Down Expand Up @@ -66,7 +67,7 @@ logging-service {
name = "console"
}
]
default-appender = file
default-appender = console
default-appender = ${?ENSO_LOGSERVER_APPENDER}
}
}
Expand Down

0 comments on commit 5b0f20a

Please sign in to comment.