@@ -32,8 +32,8 @@ private static void Main(string[] args)
3232
3333 private static void DemoLogger ( ILogger logger )
3434 {
35- // Minimum Breadcrumb and Event log levels are set to levels higher than Verbose In this case,
36- // Verbose messages are ignored
35+ // Minimum Breadcrumb and Event log levels are set to levels higher than Trace.
36+ // In this case, Trace messages are ignored
3737 logger . Trace ( "Verbose message which is not sent." ) ;
3838
3939 // Minimum Breadcrumb level is set to Debug so the following message is stored in memory and sent
@@ -82,16 +82,20 @@ private static void UsingCodeConfiguration()
8282 config
8383 . AddSentry ( o =>
8484 {
85- o . MinimumBreadcrumbLevel = LogLevel . Debug ; // Debug and higher are stored as breadcrumbs (default os Information)
85+ o . Layout = "${message}" ;
86+ o . BreadcrumbLayout = "${logger}: ${message}" ; // Optionally specify a separate format for breadcrumbs
87+
88+ o . MinimumBreadcrumbLevel = LogLevel . Debug ; // Debug and higher are stored as breadcrumbs (default is Info)
8689 o . MinimumEventLevel = LogLevel . Error ; // Error and higher is sent as event (default is Error)
8790
8891 // If DSN is not set, the SDK will look for an environment variable called SENTRY_DSN. If
8992 // nothing is found, SDK is disabled.
9093 o . Dsn = new Dsn ( "https://[email protected] /1188141" ) ; 94+
9195 o . AttachStacktrace = true ;
92- o . SendDefaultPii = true ; // send Personal Identifiable information like the username of the user logged in to the device
96+ o . SendDefaultPii = true ; // Send Personal Identifiable information like the username of the user logged in to the device
9397
94- o . IncludeEventDataOnBreadcrumbs = true ;
98+ o . IncludeEventDataOnBreadcrumbs = true ; // Optionally include event properties with breadcrumbs
9599 o . ShutdownTimeoutSeconds = 5 ;
96100
97101 o . AddTag ( "logger" , "${logger}" ) ; // Send the logger name as a tag
@@ -104,6 +108,7 @@ private static void UsingCodeConfiguration()
104108 config . AddTarget ( new ColoredConsoleTarget ( "console" ) ) ;
105109 config . AddRuleForAllLevels ( "console" ) ;
106110 config . AddRuleForAllLevels ( "debugger" ) ;
111+
107112 LogManager . Configuration = config ;
108113
109114 var Log = LogManager . GetCurrentClassLogger ( ) ;
0 commit comments