Skip to content

Latest commit

 

History

History
23 lines (18 loc) · 1.36 KB

File metadata and controls

23 lines (18 loc) · 1.36 KB

SerilogSample

Simple sample showing how to get Serilog going

What To Do

  1. Follow the commit steps and see how I got the logging to work
  2. Press f5
  3. Click the button a few times
  4. Look at the Immediate window or look at the log file in bin\debug

Sample Output

2019-02-12 19:43:02.693 -05:00 [Information] (SerilogTester.My.MyApplication.MyApplication_Startup(System.Object, Microsoft.VisualBasic.ApplicationServices.StartupEventArgs)) App start.
2019-02-12 19:43:04.031 -05:00 [Information] (SerilogTester.frmTest.btnTest_Click(System.Object, System.EventArgs)) You clicked me.
2019-02-12 19:43:04.148 -05:00 [Information] (SerilogTester.frmTest.btnTest_Click(System.Object, System.EventArgs)) You clicked me.
2019-02-12 19:43:04.293 -05:00 [Information] (SerilogTester.frmTest.btnTest_Click(System.Object, System.EventArgs)) You clicked me.
2019-02-12 19:43:04.440 -05:00 [Information] (SerilogTester.frmTest.btnTest_Click(System.Object, System.EventArgs)) You clicked me.
2019-02-12 19:43:04.572 -05:00 [Information] (SerilogTester.frmTest.btnTest_Click(System.Object, System.EventArgs)) You clicked me.
2019-02-12 19:43:04.702 -05:00 [Information] (SerilogTester.frmTest.btnTest_Click(System.Object, System.EventArgs)) You clicked me.
2019-02-12 19:43:04.951 -05:00 [Information] (SerilogTester.frmTest.btnTest_Click(System.Object, System.EventArgs)) You clicked me.