Click here to Skip to main content
15,905,867 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
What is the correct format of log file? I mean what all details we include in Log file of a project
Posted
Updated 24-May-10 20:07pm
v2

saloni15 wrote:
What is the correct format of log file?


There is no such fixed/specified format! Usually 'txt' format is used as its easy to loginto and is easily readable.


saloni15 wrote:
mean what all details we include in Log file of a project


Any detail you like to! Exceptions, alerts of some kind, Execution trace...
 
Share this answer
 
as mentioned in previous answer there is no fixed format.
if you use a database or logfile, at least add a datetimestamp for each line you log.

things to log:
* ALL exceptions and errors.
* ALL SQL statements you execute
* beginning and end of methods, preferably with the values of the arguments passed in or returned. (also give the name of the method for easy retrievel)
* anything that might be helpful for debugging, eg. calculated local variables. login status. (do not log the password !)

You could also add a debug level, 1 - 5 that will log more information depending on the argument you pass.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900