An open API service indexing awesome lists of open source software.

https://github.com/emako/fischless.logger

A simple logger library
https://github.com/emako/fischless.logger

asynclogger csharp dotnet logger logging

Last synced: 6 months ago
JSON representation

A simple logger library

Awesome Lists containing this project

README

        

[![NuGet](https://img.shields.io/nuget/v/Fischless.Logger.svg)](https://nuget.org/packages/Fischless.Logger) [![GitHub license](https://img.shields.io/github/license/emako/Fischless.Logger)](https://github.com/emako/Fischless.Logger/blob/master/LICENSE) [![Actions](https://github.com/emako/Fischless.Logger/actions/workflows/library.nuget.yml/badge.svg)](https://github.com/emako/Fischless.Logger/actions/workflows/library.nuget.yml)

# Fischless.Logger

A simple logger library used for [Fischless](https://github.com/GenshinMatrix/Fischless).

## Usage

```c#
Log.Logger = LoggerConfiguration.CreateDefault()
.UseType(LoggerType.Async)
.UseLevel(LogLevel.Trace)
.WriteToFile(
logFolder: Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), @$"Fischless.Logger.Test\log"),
fileName: $"Fischless_{DateTime.Now:yyyyMMdd}.log"
)
.CreateLogger();

Log.Information("Hello, World!");
Log.CloseAndFlush();
```