Skip to content

logback logs location with external properties #9243

@solairerove

Description

@solairerove

So, what's the issue.

According to reference, logging.path property in application.properties maps to ${LOG_PATH} in logback-*.xml file. It's working good with absolute /var/logs and relative logs paths. But when i get external property in such way:
image
with java -jar *.jar --external.config=*.properties i have an issue, cause of starting logback first.

So property is not defined in such way. To resolve it, i get new variable ${LOG_HOME:-logs} in logback and use java -DLOG_HOME=/path/to/logs -jar *.jar --external.config=*.properties. The last working enough.

Is there some other fabulous way to resolve it through properties?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions