My question is simple: what to write into a log. Are there any conventions? What do I have to put in?
Since my app has to be released, I\'d like to have friendly log
timeStamp i.e. DateTime YYYY/MM/DD:HH:mm:ss:ms User Thread ID Function Name Message/Error Message/Success Message/Function Trace
Have this in XML format and you can then easily write a parser for it.
<log>
<logEntry DebugLevel="0|1|2|3|4|5....">
<TimeStamp format="YYYY/MM/DD:HH:mm:ss:ms" value="2009/04/22:14:12:33:120" />
<ThreadId value="" />
<FunctionName value="" />
<Message type="Error|Success|Failure|Status|Trace">
Your message goes here
</Message>
</logEntry>
</log>