-
-
Save vchircu/4df14a1a33a0dc3aa201a62f6193db96 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class LoggerUnitOfWork : IManageUnitsOfWork | |
{ | |
private static readonly ILog logger = LogManager.GetLogger(typeof(LoggerUnitOfWork)); | |
public void Begin() | |
{ | |
logger.Info("Started processing a message."); | |
} | |
public void End(Exception ex = null) | |
{ | |
if (ex != null) | |
{ | |
logger.Error("Finished processing with errors.", ex); | |
} | |
else | |
{ | |
logger.Info("Successfully processed the message."); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment