Does anyone know how to dump environment name in log4net?
e.g.
<conversionPattern value="%date{ISO8601} Server:%property{log4net:HostName} [%-5level] %m" />
This will give computer name.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Not sure what do you mean by “environment name”, but with log4net contexts you can log anything: logged on user, ip address if dynamic etc.
Not sure how to add it to the e-mail subject, but in the body pattern would be:
after you init log4net, call this: