Skip to content

Instantly share code, notes, and snippets.

@grumpydev
Created May 8, 2015 15:15
Show Gist options
  • Select an option

  • Save grumpydev/0a0be1d2cba009b37d3c to your computer and use it in GitHub Desktop.

Select an option

Save grumpydev/0a0be1d2cba009b37d3c to your computer and use it in GitHub Desktop.

Revisions

  1. grumpydev created this gist May 8, 2015.
    14 changes: 14 additions & 0 deletions seq.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,14 @@
    public LoggerConfiguration BuildLogger(
    LoggerConfiguration logConfiguration,
    LogEventLevel logLevel,
    string nodeName,
    string roleName)
    {
    var path = this.SanitisePath(this.GetPath(logLevel, nodeName, roleName, this._configuration));

    var configuration = logConfiguration.WriteTo.Seq(this._serverUrl, logLevel, bufferBaseFilename: path, period: TimeSpan.FromMinutes(1));

    configuration.Enrich.FromLogContext();

    return configuration;
    }