public ActionResult <IEnumerable <string> > GetTest() { PioneerLogsTub.CorrelationId = Guid.NewGuid().ToString(); PioneerLogsTub.LogUsage("RunUsageLoggingTask", HttpContext); PioneerLogsTub.LogDiagnostic("Some Random Message.", HttpContext); return(Ok()); }
private static void BusinessLogicLoop(Guid id) { PioneerLogsTub.CorrelationId = id.ToString(); RunPerformanceLoggingTask(); RunUsageLoggingTask(); RunDiagnosticLoggingTask(); PioneerLogsTub.LogError("Oh NO!!!"); }
private static void Main(string[] args) { _config = PioneerLogsTub.RegisterLogger(); BusinessLogicLoop(Guid.NewGuid()); Console.ReadLine(); throw new Exception("Global exception test"); }
//[PioneerLogsTrackUsage(Message = "TestController Get")] public ActionResult <IEnumerable <string> > Get() { PioneerLogsTub.LogDiagnostic("Hi, I am about to force an Exception.", HttpContext, new Dictionary <string, object> { { "Test", "Parameter" } }); throw new Exception("I just manually forced an Exception. Enjoy!"); }
public ActionResult <IEnumerable <string> > GetTest() { PioneerLogsTub.CorrelationId = Guid.NewGuid().ToString(); PioneerLogsTub.LogUsage("RunUsageLoggingTask", HttpContext); PioneerLogsTub.LogDiagnostic("Some Random Message.", HttpContext); var errors = new ModelStateDictionary(); errors.AddModelError("date", "frick"); return(ValidationProblem(errors)); }
private static void RunDiagnosticLoggingTask() { PioneerLogsTub.LogDiagnostic("Some Random Message."); }
private static void RunUsageLoggingTask() { PioneerLogsTub.LogUsage("RunUsageLoggingTask"); }
private static void RunPerformanceLoggingTask() { PioneerLogsTub.StartPerformanceTracker(); System.Threading.Thread.Sleep(1000); PioneerLogsTub.StopPerformanceTracker(); }