You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A Serilog Sink for Garry's Mod Clients' and Servers' consoles.
2
+
A [Serilog](https://serilog.net/) Sink for Garry's Mod clients' and servers' consoles for [GmodDotNet](https://github.com/GmodNET/GmodDotNet) modules.
3
+
4
+
## Usage
5
+
GmodNET.Serilog.Sink can be used with Serilog logger as [any other standard sink](https://github.com/serilog/serilog/wiki/Configuration-Basics) by calling corresponding extension method on `LoggerSinkConfiguration`. Here is an example of usage of GmodNET.Serilog.Sink with [GmodDotNet](https://github.com/GmodNET/GmodDotNet) module:
Loggerlogger=newLoggerConfiguration() // Create a logger configuration
24
+
.MinimumLevel.Information() // Set a global minimal event level for logger to Information
25
+
.WriteTo.GmodSink(restrictedToMinimumLevel: LogEventLevel.Warning) // Add a game console sink which writes only events of Warning severity level and above
26
+
.CreateLogger();
27
+
28
+
logger.Warning("Here is a warning to game console!");
0 commit comments