/// <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); } }
/// <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); } }