Connecting Tech Pros Worldwide Forums | Help | Site Map

Where to store custom error log

Guest
 
Posts: n/a
#1: Jun 27 '08
I want to write some custom error messages to a log so that I can read them
on the next run of the application and as the user to send them to me.

Where the right place to store this log file? Which directory path is the
right one - so that it's always writable regardless of the user's
permissions. I guess it's more of an application-level log than a user-level
log. Or maybe not.

Is there an up-to-date (e.g. .NET 3.5/Vista specific) description of what
the various system directory paths are for?


zacks@construction-imaging.com
Guest
 
Posts: n/a
#2: Jun 27 '08

re: Where to store custom error log


On Apr 21, 6:04*am, <Debbie.Cr...@nospamforme.comwrote:
Quote:
I want to write some custom error messages to a log so that I can read them
on the next run of the application and as the user to send them to me.
>
Where the right place to store this log file? Which directory path is the
right one - so that it's always writable regardless of the user's
permissions. I guess it's more of an application-level log than a user-level
log. Or maybe not.
>
Is there an up-to-date (e.g. .NET 3.5/Vista specific) description of what
the various system directory paths are for?
string sLogFolder =
Environment.GetFolderPath(Environment.SpecialFolde r.LocalApplicationData)
+ "\\" + Application.CompanyName + "\\" + Application.ProductName

is how I do it.
DSK Chakravarthy
Guest
 
Posts: n/a
#3: Jun 27 '08

re: Where to store custom error log


Create an application event at the event log and store that there. So that
next time you run the app, your app can read that first and from there it
can further go ahead.

HTH


<Debbie.Croft@nospamforme.comwrote in message
news:%23DXxLc5oIHA.3652@TK2MSFTNGP03.phx.gbl...
Quote:
>I want to write some custom error messages to a log so that I can read them
>on the next run of the application and as the user to send them to me.
>
Where the right place to store this log file? Which directory path is the
right one - so that it's always writable regardless of the user's
permissions. I guess it's more of an application-level log than a
user-level log. Or maybe not.
>
Is there an up-to-date (e.g. .NET 3.5/Vista specific) description of what
the various system directory paths are for?
Alcides
Guest
 
Posts: n/a
#4: Jun 27 '08

re: Where to store custom error log


On Apr 21, 6:04*am, <Debbie.Cr...@nospamforme.comwrote:
Quote:
I want to write some custom error messages to a log so that I can read them
on the next run of the application and as the user to send them to me.
>
Where the right place to store this log file? Which directory path is the
right one - so that it's always writable regardless of the user's
permissions. I guess it's more of an application-level log than a user-level
log. Or maybe not.
>
Is there an up-to-date (e.g. .NET 3.5/Vista specific) description of what
the various system directory paths are for?
In our application we just write to a network folder. We write a file
per user, whenever we got an exception with some details that usually
the user don't have access or forget to tell, program name, error
message, stack, etc. The user just says the system is not working...:)
Of course this is our case...

Alcides Schulz


Closed Thread