I am using Log4Net with the AdoNetAppender to log messages from a simple systray application into a SQL Server 2005 database.
I want to log the machine name along with the log message because this application will be running on multiple machines and I need to know on which one the message originated.
But, I cannot find a way to expose this information via the log4net.Layout.PatternLayout that I am using with the appender.
Is there a way to log the machine name via log4net in this manner?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…