Skip to content

Reconfigure log4j2 programmatically #419

@raubel

Description

@raubel

Hi,

I would like to reconfigure log4j2 after initialisation using an Xml Configuration provided by a UI (i.e. not persisted to a file).
However, it looks like pax-logging with log4j2 backend only supports configuration by a set of log4j2 properties (but we do not want that) or by the path to a log4j2 configuration file (but we do not want to persist the UI configuration to a temporary file).

Is there a way to pass a log4j2 XmlConfiguration to log4j2 through pax-logging?
Or would a direct reconfiguration of log4j2 (using log4j2 Configurator) in the context of pax-logging and OSGI work?

Any help would be greatly appreciated.
Rémi

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