Skip to content

fix: logging configuration properties not working from launcher.cnl#1647

Merged
derklaro merged 4 commits intoCloudNetService:nightlyfrom
ttugrul:logging-var-fix
Jun 3, 2025
Merged

fix: logging configuration properties not working from launcher.cnl#1647
derklaro merged 4 commits intoCloudNetService:nightlyfrom
ttugrul:logging-var-fix

Conversation

@ttugrul
Copy link
Contributor

@ttugrul ttugrul commented Jun 2, 2025

Motivation
Logging properties set in launcher.cnl (like var cloudnet.log.level OFF) were being ignored.

Modification
Changed logback XML files to read system properties directly instead of using cached variables:
${cloudnet.log.level} → ${cloudnet.log.level:-DEBUG}
${cloudnet.log.path} → ${cloudnet.log.path:-local/logs}

Result
Logging configuration from launcher.cnl now works correctly. Users can set custom log levels and paths.

Other context
Fixes timing issue where logback initialized before system properties were available.

ttugrul added 2 commits June 2, 2025 18:54
Problem

Settings for logging in launcher.cnl for logging were ignored

Cause

Logback was using cached variables instead of reading the actual system properties set by the launcher.

Fix

Changed logback XML files to read system properties directly
Fix logging configuration properties not working from launcher.cnl
Problem

Settings for logging in launcher.cnl for logging were ignored

Cause

Logback was using cached variables instead of reading the actual system properties set by the launcher.

Fix

Changed logback XML files to read system properties directly
@ttugrul ttugrul changed the title Fix logging configuration properties not working from launcher.cnl fix: logging configuration properties not working from launcher.cnl Jun 2, 2025
@derklaro
Copy link
Member

derklaro commented Jun 2, 2025

I wonder if it would be better to move the variable subsitutation into the variable values, so that they are defined at the top of the configuration. I think the same result can be achived using something like:

<variable name="cloudnet.log.level" value="${cloudnet.log.level:-DEBUG}"/>

@derklaro derklaro added v: 4.X This pull should be included in the 4.0 release in: node An issue/pull request releated to the node module code t: fix A pull request introducing a fix for a bug. in: wrapper An issue/pull request releated to the wrapper module code labels Jun 3, 2025
@derklaro derklaro added this to the 4.0.0-RC13 milestone Jun 3, 2025
@derklaro derklaro merged commit cedb138 into CloudNetService:nightly Jun 3, 2025
3 checks passed
@derklaro
Copy link
Member

derklaro commented Jun 3, 2025

@ttugrul thanks!

GiantTreeLP pushed a commit to GiantTreeLP/CloudNet that referenced this pull request Jun 7, 2025
…oudNetService#1647)

Motivation
Logging properties set in launcher.cnl (like var cloudnet.log.level OFF)
were being ignored.

Modification
Changed logback XML files to read system properties directly instead of
using cached variables.

Result
Logging configuration from launcher.cnl now works correctly. Users can
set custom log levels and paths.

---------

Co-authored-by: Pasqual Koschmieder <git@derklaro.dev>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: node An issue/pull request releated to the node module code in: wrapper An issue/pull request releated to the wrapper module code t: fix A pull request introducing a fix for a bug. v: 4.X This pull should be included in the 4.0 release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants