static void Main(string[] args) { ConfigureSerilog(); Logger.Debug("Application starting"); try { Settings settings = new Settings() { TriggerAdapter = "Test", NotificationAdapter = "Email", PersistenceAdapter = "Test", PersistenceConnectionString = "server=127.0.0.1;" + "uid=bookorder_service;" + "pwd=123;" + "database=bookorders" }; Application application = new Application(settings); application.Configure(); application.Run(); System.Console.ReadLine(); Logger.Debug("Application shutting down"); application.Shutdown(); } catch (Exception ex) { Logger.Error(ex, ex.StackTrace); } }
public void Debug_WithStringAndParameters_ShouldCallHandler() { AmbientLogService sut = new AmbientLogService(); string message = Guid.NewGuid().ToString(); sut.Debug(message, 1, 2); _handler1.Received(1).Debug(message, 1, 2); }
public void Debug_WithExceptionString_ShouldCallHandler() { AmbientLogService sut = new AmbientLogService(); string message = Guid.NewGuid().ToString(); var exception = new Exception(); sut.Debug(exception, message); _handler1.Received(1).Debug(exception, message); }