0

This is done inside of a mvc5 application, setting up the file appenders was the easy part. Now I'm stuck as to how to go about setting up a logging such that:

  1. Daily file logging names are in the format "logfileName-{month}-{day}-{year}.txt" format
  2. Setting up a daily log file appender such that after 24 hours the log file or log information is sent to a email address.

I'm surprised that I'm having such a hard time finding examples of such a solution. I don't think what I'm doing is revolutionary or unique. Any examples or documentation (especially for the email smtp part) would be greatly appreciated.

And yes I have looked at http://logging.apache.org/log4net/release/config-examples.html

4

1 回答 1

0

对于 1,将 DatePattern 设置为带引号的扩展名

<param name="DatePattern" value="MM-dd-yyyy'.txt'"/>
于 2016-04-18T13:22:38.527 回答