logging-log4net-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shireesh Thanneru <thann...@yahoo.com>
Subject How to enforce certain things in log messages while still giving the flexibility to add more things
Date Wed, 24 Aug 2005 04:49:28 GMT

I have kind of an unusual requirement here...let me explain it. While we want the extreme
flexibility that Log4Net provides, we also want to make sure certain things always get logged
with every log message. Basically, with each log message, we want to make sure certain things
always get logged, for example: Date, Time, App Name, Class Name, Method Name, Line Number
and ThreadId along with the actual log message. 

So, while we want to use the Pattern Layout that Log4Net provides which can be used to log
the above information (and lot of other additional info), any one can change config file and
remove these elements from it resulting in a log file that won't contain these parameters
making the support people's job a nightmare. So, we are kind of looking for a middle of the
road solution, where certain things always get logged (mentioned above) and developers or
end users can enable more things in the PatternLayout if they want more things in the log
file but they shouldn't be able to remove any of the enforced parameters.

Thanks in advance.


Shireesh Thanneru

View raw message