纽威
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
658 B

3 years ago
  1. using log4net;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. namespace NFine.Data.Extensions
  8. {
  9. public class LogHelper
  10. {
  11. private ILog logger;
  12. public LogHelper(ILog log)
  13. {
  14. this.logger = log;
  15. }
  16. public void Error(object message)
  17. {
  18. this.logger.Error(message);
  19. DbResultMsg.ReturnMsg = message.ToString();
  20. }
  21. public void Error(object message, Exception e)
  22. {
  23. this.logger.Error(message, e);
  24. DbResultMsg.ReturnMsg = message.ToString();
  25. }
  26. }
  27. }