Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  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?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement