Skip to content

Instantly share code, notes, and snippets.

@vchircu
Last active July 10, 2016 08:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vchircu/4df14a1a33a0dc3aa201a62f6193db96 to your computer and use it in GitHub Desktop.
Save vchircu/4df14a1a33a0dc3aa201a62f6193db96 to your computer and use it in GitHub Desktop.
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