示例#1
0
    public static LoggerConfiguration GameLog(
        this LoggerSinkConfiguration sinkConfiguration,
        LogEventLevel restrictedToMinimumLevel = LevelAlias.Minimum,
        string outputTemplate          = DefaultDebugOutputTemplate,
        IFormatProvider formatProvider = null,
        LoggingLevelSwitch levelSwitch = null)
    {
        if (sinkConfiguration == null)
        {
            throw new ArgumentNullException(nameof(sinkConfiguration));
        }
        if (outputTemplate == null)
        {
            throw new ArgumentNullException(nameof(outputTemplate));
        }

        var formatter = new MessageTemplateTextFormatter(outputTemplate, formatProvider);

        return(sinkConfiguration.GameLog(formatter, restrictedToMinimumLevel, levelSwitch));
    }