Skip to content

Logger reconfigure Handle is inaccessible #390

Open
@izolyomi

Description

@izolyomi

First of all, thank you for this awesome library.

I'm building a small UI app and would like to use log4rs in a multilog context besides another logger, similarly to https://github.com/davechallis/multi_log . My rationale is that while log4rs can nicely handle console and file logging, displaying messages on a UI is fully out of the scope of this crate and it's probably better to use an independent component there.

Creating a Logger instance from a log4rs Root and then Config instance seems to be nicely supported already. On the other hand, a Handle can be created and used to reload the configuration only when directly setting log4rs as the single global logger instance e.g. using init_config. I'd expect that a Logger has a get_handle(&self) -> Handle or similar function to support config reloads without init_...() functions.

Was it a deliberate choice to prevent this workflow or am I discovering a possible scenario that simply wasn't thought of yet?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions