Example #1
0
File: Simple.cs Project: kinpro/XVA
 /// <summary>
 /// Log the incomming data and send it back to the caller only
 /// </summary>
 /// <param name="model"></param>
 public void LogTest(SomeModel model)
 {
     try
     {
         //Get the logger and write with level information
         Composable.GetExport<IXLogger>().Information("LogTest: {now}, {@model}", DateTime.Now, model);
         //And... throw...
         throw new Exception("Ohh crap!");
     }
     catch (Exception ex)
     {
         Composable.GetExport<IXLogger>().Error("LogTest: {now}, {message}", DateTime.Now, ex.Message);
     }
 }
Example #2
0
 /// <summary>
 /// Log the incomming data and send it back to the caller only
 /// </summary>
 /// <param name="model"></param>
 public void LogTest(SomeModel model)
 {
     try
     {
         //Get the logger and write with level information
         Composable.GetExport <IXLogger>().Information("LogTest: {now}, {@model}", DateTime.Now, model);
         //And... throw...
         throw new Exception("Ohh crap!");
     }
     catch (Exception ex)
     {
         Composable.GetExport <IXLogger>().Error("LogTest: {now}, {message}", DateTime.Now, ex.Message);
     }
 }