Is there any way using log4net to automatically write date/time and class name/function name to the start of each logged line?
Is there any way using log4net to automatically write date/time and class name/function name
Share
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.
In the
log4netconfiguration file modify Appender section by adding a PatternLayout with custom format. Following pattern will output DateTime ClassName.MethodNameYou can output fully qualified name of class by changing
%C{1}to%C