I'm trying to use Serilog with the Raygun sink using AutoFac
I successfully configure Serilog with AutoFact using https://groups.google.com/forum/#!topic/serilog/R23B8CLso9Q
If I want to log a trace/debug/info to a log rolling file ONLY and warning/error/fatal to a rolling file and raygun
How can I configure the log?
This is my actual conf:
public static ILogger CreateLogger()
{
var config = new LoggerConfiguration()
.ReadAppSettings();
InitialiseGlobalContext(config);
return config.CreateLogger();
}
with the this web.config entries:
<add key="serilog:minimum-level" value="Verbose" />
<add key="serilog:write-to:RollingFile.path" value="D:\WebRole\Logs\file-{Date}.txt" />
<add key="serilog:write-to:RollingFile.fileSizeLimitBytes" value="1024" />
<add key="serilog:write-to:RollingFile.retainedFileCountLimit" value="10" />
<add key="serilog:write-to:RollingFile.outputTemplate" value="{Timestamp} [{Level}] [{MachineName},{ApplicationName},{RuntimeVersion}] {Message}{NewLine}{Exception}" />
Since the conf is global, if I add .WriteTo.Raygun(), It will log trace/debug/info to raygun I dont want that.
Any ideas