SHARE
TWEET

Untitled

a guest Jul 22nd, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //** Configure Start Up Logger. The purpose of this logger is to contain errors about configuration, template files and anything
  2. //** else that can be determined at startup to cause issues for program execution.
  3. var StartupLogger = new LoggerConfiguration()
  4.     .WriteTo.File(startupLoggerPath)
  5.     .CreateLogger();
  6.  
  7.  
  8. StartupLogger.Information("Log Some Stuff");
  9.  
  10.  
  11.  
  12. //** Configure Master Logger. All other loggers log to this logger. This provides a catch all for all log statements
  13. var MasterLogger = new LoggerConfiguration()
  14.     .WriteTo.Console()
  15.     .WriteTo.File(RootLoggingDirectoryPath, flushToDiskInterval: TimeSpan.FromSeconds(1), rollingInterval: RollingInterval.Day, retainedFileCountLimit: 730)
  16.     .CreateLogger();
  17.  
  18. //** How do I dump the StartUp Log into the Master Logger? Can I go to some kind of buffer then dump it to the Master?
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top