Skip to content
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

Ensure project-manager's logs are centrally collected #12361

Merged
merged 1 commit into from
Feb 26, 2025
Merged
Show file tree
Hide file tree
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 @@ -76,7 +76,10 @@ public void run() {
event = (ILoggingEvent) hardenedLoggingEventInputStream.readObject();
if (projectId == null) {
try {
projectId = UUID.fromString(event.getMDCPropertyMap().get("project.id"));
var property = event.getMDCPropertyMap().get("project.id");
if (property != null) {
projectId = UUID.fromString(property);
}
} catch (IllegalArgumentException e) {
// ignore
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ logLevel, actualPort, logPath(), logFileSuffix(), config.getServer(), ec)
if (result.isFailure()) {
setup(Option.apply(logLevel), Option.empty(), logMasking, loggerSetup);
} else {
URI uri = result.get();
Masking.setup(logMasking);
if (!loggerSetup.setup(logLevel)) {
LoggingServiceManager.teardown();
loggingServiceEndpointPromise.failure(new LoggerInitializationFailed());
} else {
URI uri = result.get();
loggingServiceEndpointPromise.success(Option.apply(uri));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ logging-service {
name = "file"
}
]
default-appender = file
default-appender = socket
default-appender = ${?ENSO_APPENDER_DEFAULT}
log-to-file {
enable = true
Expand All @@ -55,9 +55,9 @@ logging-service {
port = ${?ENSO_LOGSERVER_PORT}
log-to-file {
enable = true
enable = ${?ENSO_LOG_TO_FILE}
enable = ${?ENSO_LOGSERVER_LOG_TO_FILE}
log-level = debug
log-level = ${?ENSO_LOG_TO_FILE_LOG_LEVEL}
log-level = ${?ENSO_LOGSERVER_LOG_TO_FILE_LOG_LEVEL}
}
appenders = [ # file/console/socket/sentry
{
Expand Down
Loading