private void WriteToConsole(LogArguments logArguments) => logBuffer .Check(logArguments.IsLevelAllowed(configuration.Level)) ?.Add(logArguments.ToStringLogUsing(configuration)) .Validate(configuration.BufferSize) ?.Write(ConsoleBulkWriter.ToConsole, kv => kv.Value);
private void WriteToFile(LogArguments logArguments) => logBuffer .Check(logArguments.IsLevelAllowed(configuration.Level)) ?.Add(logArguments.ToStringLogUsing(configuration)) .Validate(configuration.BufferSize) ?.Write(FileBulkWriter.ToFileAsync, kv => $"{kv.Value}{Environment.NewLine}");