Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can provider file system support #161

Open
yaojingdeweiba opened this issue Jan 14, 2025 · 2 comments
Open

can provider file system support #161

yaojingdeweiba opened this issue Jan 14, 2025 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@yaojingdeweiba
Copy link

When i write my logs to the file flodler ,how can i use this project to show my logs ui

@mo-esmp mo-esmp added the enhancement New feature or request label Jan 14, 2025
@mo-esmp mo-esmp self-assigned this Jan 14, 2025
@mo-esmp
Copy link
Member

mo-esmp commented Jan 14, 2025

Unfortunately, we have no data provider for Serilog.Sinks.File. I will start initial work to see how it can be implemented (duplicate of #72).

What is your RollingInterval for creating log files?

@yaojingdeweiba
Copy link
Author

        Serilog.Debugging.SelfLog.Enable(msg => Console.Error.WriteLine(msg));
        //#if DEBUG
        Log.Logger = new LoggerConfiguration()

#if DEBUG
//Information()
.MinimumLevel.Information()
#else
.MinimumLevel.Warning()
#endif
.Enrich.FromLogContext()
.WriteTo.Console()
.WriteTo.File(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data", "SysLogs", $"log-{DateTime.Now:yyyyMMdd}.log"),
rollingInterval: RollingInterval.Day, outputTemplate: "{Timestamp:yyyy-MM-dd HH:mm} || {Level} || {SourceContext:l} || {Message} || {Exception} ||end {NewLine}") this is my function write logs to files

before i also write logs to seq:
.WriteTo.Seq("http://localhost:9041", apiKey: "*") but my project not distributed,after i just use file Folder mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants