Skip to content

How can I get the log file directory at runtime? #170

@chucklu

Description

@chucklu
 loggerConfiguration = loggerConfiguration.ReadFrom.AppSettings(filePath: path);
                    var logger = loggerConfiguration.CreateLogger();
                    Log.Logger = logger;

After create the logger, I would like to get the log file directory from the logger. However, I checked the source code, find you encapsulate class with lots of private fields and initialize fields with constructor.
Then how could I get the LogFileDirectoy at runtime?
The PathRoller instance is a private field of RollingFileSink.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions