Click here to Skip to main content
15,909,898 members
Home / Discussions / C#
   

C#

 
AnswerRe: extension method Pin
samu4u25-Oct-12 23:53
samu4u25-Oct-12 23:53 
GeneralRe: extension method Pin
Pete O'Hanlon26-Oct-12 0:14
mvePete O'Hanlon26-Oct-12 0:14 
GeneralRe: extension method Pin
mhd.sbt26-Oct-12 0:41
mhd.sbt26-Oct-12 0:41 
Questionregarding wcf Binding and endpoint Pin
Tridip Bhattacharjee25-Oct-12 8:54
professionalTridip Bhattacharjee25-Oct-12 8:54 
AnswerRe: regarding wcf Binding and endpoint Pin
Pete O'Hanlon25-Oct-12 9:00
mvePete O'Hanlon25-Oct-12 9:00 
GeneralRe: regarding wcf Binding and endpoint Pin
Ravi Bhavnani25-Oct-12 10:13
professionalRavi Bhavnani25-Oct-12 10:13 
AnswerRe: regarding wcf Binding and endpoint Pin
Dave Kreskowiak25-Oct-12 10:26
mveDave Kreskowiak25-Oct-12 10:26 
QuestionNeed a little hint my brain is burned out Pin
Mendor8125-Oct-12 4:24
professionalMendor8125-Oct-12 4:24 
AnswerRe: Need a little hint my brain is burned out Pin
Richard MacCutchan25-Oct-12 6:25
mveRichard MacCutchan25-Oct-12 6:25 
AnswerRe: Need a little hint my brain is burned out Pin
Eddy Vluggen25-Oct-12 8:33
professionalEddy Vluggen25-Oct-12 8:33 
AnswerRe: Need a little hint my brain is burned out Pin
Clifford Nelson26-Oct-12 9:20
Clifford Nelson26-Oct-12 9:20 
Questionapplication logging strategy - advice Pin
Simon_Whale25-Oct-12 4:22
Simon_Whale25-Oct-12 4:22 
AnswerRe: application logging strategy - advice Pin
Richard MacCutchan25-Oct-12 6:23
mveRichard MacCutchan25-Oct-12 6:23 
GeneralRe: application logging strategy - advice Pin
R. Giskard Reventlov25-Oct-12 6:37
R. Giskard Reventlov25-Oct-12 6:37 
GeneralRe: application logging strategy - advice Pin
Simon_Whale25-Oct-12 11:50
Simon_Whale25-Oct-12 11:50 
AnswerRe: application logging strategy - advice Pin
Eddy Vluggen25-Oct-12 8:41
professionalEddy Vluggen25-Oct-12 8:41 
GeneralRe: application logging strategy - advice Pin
Simon_Whale25-Oct-12 12:01
Simon_Whale25-Oct-12 12:01 
AnswerRe: application logging strategy - advice Pin
jschell25-Oct-12 10:43
jschell25-Oct-12 10:43 
GeneralRe: application logging strategy - advice Pin
Simon_Whale25-Oct-12 12:02
Simon_Whale25-Oct-12 12:02 
AnswerRe: application logging strategy - advice Pin
V.25-Oct-12 21:10
professionalV.25-Oct-12 21:10 
I've done some fair logging and mostly the needs depend a little on the application.
There are several questions that need to answering:

1. What
Despite the actual text you might want to log off course, the datetimestamp (go millisecond or smaller!), but also who was the user at the time, what machine, which application, module, class, method and finally you'll need a log type (error, warning, information,...) and severity.

2. When
Concerning the actual log message I usually log every exception and the SQL statements.  Then mostly I add logging at key points eg when receiving information from a webservice call or when we send an email succesfully, ...

3. Where
Mostly one logs to a txt file or something like that.  I find that horrible personally.  If you have one application, no problem, but if you have a system, log to the database.  It will be easier to trace the sequence instead of going through five log files at the same time comparing datetime stamps.  It is always possible to catch a db down and write to txt file as backup.

4. How
Prevent in using a method inside each class, create an assembly that can be used by all applications.  Built in a debug level setting that will prevent logging too verbose when not required.


Hope this helps.

Questionapplicatin developing in c# Pin
krishnaveni_g24-Oct-12 23:29
krishnaveni_g24-Oct-12 23:29 
AnswerRe: applicatin developing in c# Pin
Eddy Vluggen24-Oct-12 23:35
professionalEddy Vluggen24-Oct-12 23:35 
AnswerRe: applicatin developing in c# Pin
Sivaraman Dhamodharan24-Oct-12 23:47
Sivaraman Dhamodharan24-Oct-12 23:47 
AnswerMy vote of 1 Pin
Keith Barrow25-Oct-12 2:49
professionalKeith Barrow25-Oct-12 2:49 
AnswerRe: applicatin developing in c# Pin
Vasudevan Deepak Kumar25-Oct-12 8:54
Vasudevan Deepak Kumar25-Oct-12 8:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.