where should I put log files?

  • Thread starter Thread starter Guest
  • Start date Start date
Drive:\WINDOWS\system32\LogFiles is the standard place to put them.

You shouldn't place current logfiles online, anyway,
since the current day's logfile will be constantly overwritten.

You could copy the previous day's logfile to any directory
outside your application's physical scope, and read it/display
its data any way you want to.

You don't have to locate your files within an application in order to read them.




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
Where is the standard place to write log files to?

Well, by default Windows writes its log files into %SYSTEM32%\LogFiles, but
if you're hosting your site with a public ISP, chances are you won't have
access to that folder anyway.

My ISP makes a private individual area available to its customers which the
web app can write to, but which is outside the virtual directory so it can't
be reached through a browser - that's where I create my logs.

I have a custom method which does the writing out to the log file, creates a
separate log file per day etc...
 
That makes sense - I can default to that. Is there a way in web.config to
have something like ${SYSTEM32} in a filename and it automatically expands
that?

No, but you can just use System.Environment.SystemDirectory();
 
Back
Top