public App() { #region HOCKEYAPP SAMPLE CODE //this is just a sample in memory logger using MetroLog var config = new LoggingConfiguration(); var inMemoryLogTarget = new InMemoryLogTarget(40); config.AddTarget(LogLevel.Warn, inMemoryLogTarget); LogManagerFactory.DefaultConfiguration = config; //main configuration method for HockeySDK. following lines are optional configurations options HockeyClient.Current.Configure(DemoConstants.YOUR_APP_ID) .SetExceptionDescriptionLoader((ex) => { return inMemoryLogTarget.LogLines.Aggregate((a, b) => a + "\n" + b); }) //return additional info from your logger on crash // .RegisterCustomUnhandledExceptionLogic((eArgs) => { return true; }) // define a callback that is called after unhandled exception. returnvalue indicates if application exit should be called // .RegisterCustomUnobserveredTaskExceptionLogic((eArgs) => { return false; }) // define a callback that is called after unobserved task exception. returnvalue indicates if application exit should be called // .SetApiDomain("https://your.dedicated.hockey.server") .SetContactInfo(DemoConstants.USER_NAME, DemoConstants.USER_EMAIL); //optional register your logger for internal logging of HockeySDK HockeyLogManager.GetLog = (t) => { return new HockeyAppMetroLogWrapper(t); }; //optional should only used in debug builds. register an event-handler to get exceptions in HockeySDK code that are "swallowed" (like problems writing crashlogs etc.) #if DEBUG ((HockeyClient)HockeyClient.Current).OnHockeySDKInternalException += (sender, args) => { if (Debugger.IsAttached) { //Debugger.Break(); } }; #endif #endregion #region Standard template code this.InitializeComponent(); this.Suspending += this.OnSuspending; #endregion }
public App() { #region HOCKEYAPP SAMPLE CODE //this is just a sample in memory logger using MetroLog var config = new LoggingConfiguration(); var inMemoryLogTarget = new InMemoryLogTarget(40); config.AddTarget(LogLevel.Warn, inMemoryLogTarget); LogManagerFactory.DefaultConfiguration = config; //main configuration method for HockeySDK. following lines are optional configurations options HockeyClient.Current.Configure(DemoConstants.YOUR_APP_ID) .SetExceptionDescriptionLoader((ex) => { return(inMemoryLogTarget.LogLines.Aggregate((a, b) => a + "\n" + b)); }) //return additional info from your logger on crash // .RegisterCustomUnhandledExceptionLogic((eArgs) => { return true; }) // define a callback that is called after unhandled exception. returnvalue indicates if application exit should be called // .RegisterCustomUnobserveredTaskExceptionLogic((eArgs) => { return false; }) // define a callback that is called after unobserved task exception. returnvalue indicates if application exit should be called // .SetApiDomain("https://your.dedicated.hockey.server") .SetContactInfo(DemoConstants.USER_NAME, DemoConstants.USER_EMAIL); //optional register your logger for internal logging of HockeySDK HockeyLogManager.GetLog = (t) => { return(new HockeyAppMetroLogWrapper(t)); }; //optional should only used in debug builds. register an event-handler to get exceptions in HockeySDK code that are "swallowed" (like problems writing crashlogs etc.) #if DEBUG ((HockeyClient)HockeyClient.Current).OnHockeySDKInternalException += (sender, args) => { if (Debugger.IsAttached) { //Debugger.Break(); } }; #endif #endregion #region Standard template code this.InitializeComponent(); this.Suspending += this.OnSuspending; #endregion }