Skip to content

Commit b1578f4

Browse files
committed
Add docs
1 parent 5c408d8 commit b1578f4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

GmodNET.Serilog.Sink/GmodSink.cs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ public class GmodSink : ILogEventSink
2828

2929
Thread writerThread;
3030

31+
/// <summary>
32+
/// Initializes a new instance of <see cref="GmodSink"/>.
33+
/// </summary>
34+
/// <param name="formatProvider">A format provider to format event message.</param>
35+
/// <param name="logEventLevel">A minimum level of the events to log.</param>
3136
public unsafe GmodSink(IFormatProvider formatProvider, LogEventLevel logEventLevel)
3237
{
3338
this.formatProvider = formatProvider;
@@ -137,14 +142,28 @@ public unsafe GmodSink(IFormatProvider formatProvider, LogEventLevel logEventLev
137142
};
138143
}
139144

145+
/// <summary>
146+
/// Emit the provided log event to the sink.
147+
/// </summary>
148+
/// <param name="logEvent">The log event to write.</param>
140149
public void Emit(LogEvent logEvent)
141150
{
142151
messages.Add(logEvent);
143152
}
144153
}
145154

155+
/// <summary>
156+
/// Extends <see cref="LoggerSinkConfiguration"/> with methods to add Garry's Mod console sinks.
157+
/// </summary>
146158
public static class GmodSinkExtensions
147159
{
160+
/// <summary>
161+
/// Write log events to the Garry's Mod console.
162+
/// </summary>
163+
/// <param name="loggerConfiguration">Logger sink configuration.</param>
164+
/// <param name="restrictedToMinimumLevel">The minimum level for events passed through the sink.</param>
165+
/// <param name="formatProvider">Supplies culture-specific formatting information, or null.</param>
166+
/// <returns>Configuration object allowing method chaining.</returns>
148167
public static LoggerConfiguration GmodSink(this LoggerSinkConfiguration loggerConfiguration, LogEventLevel restrictedToMinimumLevel = LogEventLevel.Verbose, IFormatProvider formatProvider = null)
149168
{
150169
return loggerConfiguration.Sink(new GmodSink(formatProvider, restrictedToMinimumLevel));

0 commit comments

Comments
 (0)