where should I put log files?

J

Juan T. Llibre

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.
 
M

Mark Rae

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...
 
M

Mark Rae

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();
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top