Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Application Best Practice
Message
De
21/09/2010 10:46:43
Timothy Bryan
Sharpline Consultants
Conroe, Texas, États-Unis
 
 
À
21/09/2010 10:27:10
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
Visual FoxPro
Application:
Desktop
Divers
Thread ID:
01482155
Message ID:
01482162
Vues:
54
Hi Gary,

>As part of my .Net training today I have learnt about using the Event logs, setting our own performance counters and using the trace class and TraceSwitch.
>
>What I want to know is what is best practice or where can I read up on best practice for using these system facilities.
>
>IE.
>1. Should I just log application run and stop in the application log or should I log other information?
>2. Should I build in standard performance counters into my framework or just use them when trying to trace a performance issue?
>3. Should I build a full trace log into my framework and have a global setting to activate/deactivate?
>
>any info greatly appreciated.
>
>Gary.

Too many ideas to explore them all. With regard to application logging, I have a assembly of my own for logging within the application. I do log the startup and shutdown of the application but I also log other things. It does make traceing a problem easier. I also have method for logging exceptions as I log them a bit differently than standard log items. I have a configuration setting for turning on logging and for logging exception detail.

With regard to performance, that can be a big hit to performance itself depending on how you implement this. I would not do that at all times, but you could also control that with a configuration setting. All my logging is done to my own text file in the application directory.
Tim
Timothy Bryan
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform