Skip to content

Add ability to log to both env_logger and a custom logger #85

Closed

Description

@asajeffrey

At the moment, env_logger::init initializes the env logger, and registers it using the one-shot log::set_logger. This means there's no way to combine env logging with a custom logger.

Discussion on IRC with @alexcrichton here: http://logs.glob.uno/?c=mozilla%23servo&s=21+Jun+2016&e=21+Jun+2016#c459280

Activity

  1. kitty-eu-org commented on Feb 26, 2024

    @kitty-eu-org

    @asajeffrey I encountered the same problem, how should I deal with it? I have a channel sender that needs to send log, and at the same time I want the original log behavior. How should I do it?

  2. Thomasdezeeuw commented on Feb 26, 2024

    @Thomasdezeeuw
    Contributor

    @asajeffrey I encountered the same problem, how should I deal with it? I have a channel sender that needs to send log, and at the same time I want the original log behavior. How should I do it?

    You can implement your own custom logger that calls zero or more others loggers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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