I am using NHibernate and log4net. This is a snapshot of my error log file using my software version:
INFO 2009-04-28 03:07:06 - processing cascade NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for: bpojob.Generated.BusinessObjects.Job INFO 2009-04-28 03:07:06 - cascade NHibernate.Engine.CascadingAction+SaveUpdateCascadingAction for collection: bpojob.Generated.BusinessObjects.Job.JobItems DEBUG2009-04-28 03:07:06 - cascading to saveOrUpdate: bpojob.Generated.BusinessObjects.JobItem DEBUG2009-04-28 03:07:06 - unsaved-value: 0 DEBUG2009-04-28 03:07:06 - transient instance of: bpojob.Generated.BusinessObjects.JobItem DEBUG2009-04-28 03:07:06 - saving transient instance DEBUG2009-04-28 03:07:06 - saving [bpojob.Generated.BusinessObjects.JobItem
As you can see, all info , debug and exception are gathered together, which makes it difficult to sift the file and search for information after errors occur.
I want to put all the exception information in a file and put other information in another file. And I want to exclude debug information release mode . How to do it?
source share