I have a unique identifier which goes through whole application, I want this 'Id' to be logged as a separate property, so that its easy to find out in log files or from the database.
A:
You can use context properties e.g. like this:
ThreadContext.Properties["ID"] = yourID;
then you can access the property in the pattern string like this:
%property{ID}
Stefan Egli
2010-07-14 12:34:10