Skip to content

Changing the target of logging #369

Description

@sftse

We have an application that runs in multiple batches where inputs and outputs of a given batch have their own directory batchX. It would be useful if the log file were also inside this directory which requires changing the target at runtime. We currently do this by defining a custom type with internal locking to impl Write on and then initialize it as static to satisfy 'static lifetime of Target::Pipe, which seems a bit awkward.

Is there a better way to accommodate this?

Activity

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