Maybe someday when I learn how to use the trace class.

-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Ted Neward
Sent: Saturday, November 26, 2005 6:14 PM
To: [email protected]
Subject: Re: [ADVANCED-DOTNET] figuring out where to log to from a gac dll

Why not defer that decision? Use the System.Diagnostics.Trace class, and let
the application itself (or the config file) set up the destination for the
log information--file, event log, wherever.

Ted Neward
Author, Presenter, Consultant
Java, .NET, XML services
http://blogs.tedneward.com
> -----Original Message-----
> From: Discussion of advanced .NET topics. [mailto:ADVANCED-
> [EMAIL PROTECTED] On Behalf Of Alex Smotritsky
> Sent: Saturday, November 26, 2005 1:16 AM
> To: [email protected]
> Subject: Re: [ADVANCED-DOTNET] figuring out where to log to from a gac dll
>
> Thanks Dominick, I think I'm gonna go with
> Environment.GetFolderPath(Environment.SpecialFolder.CommonApplicationData)
>
> -----Original Message-----
> From: Discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED] On Behalf Of Dominick Baier
> Sent: Saturday, November 26, 2005 2:52 AM
> To: [email protected]
> Subject: Re: [ADVANCED-DOTNET] figuring out where to log to from a gac dll
>
> Hi,
>
> string s1 =
> Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData);
>
> this gives you a lot of directories, besides temp - but you can get temp
> via:
>
> string s2 = Environment.ExpandEnvironmentVariables("%temp%");
>
>
>
>
> cheers,
> dominick
>
> -----------------------------
> Dominick Baier, DevelopMentor
> http://www.leastprivilege.com
>
>
> -----Original Message-----
> From: Discussion of advanced .NET topics.
> [mailto:[EMAIL PROTECTED] On Behalf Of Alex Smotritsky
> Sent: Samstag, 26. November 2005 08:43
> To: [email protected]
> Subject: [ADVANCED-DOTNET] figuring out where to log to from a gac dll
>
> I want to log some things to a text file from a dll I have in the gac. One
> thought is to log to c:\temp but I don't want to hard code that so I'd
> like
> to know what's a good way to find out what the c:\temp directory is on a
> windows system. Any thoughts anyone has on other places to log to are
> welcome. I suppose the event log is an option but I'd have to discuss that
> with my partner on my project as logging to a text file is his idea.
>
>
>
>
>
>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com
>
> ===================================
> This list is hosted by DevelopMentor.  http://www.develop.com
>
> View archives and manage your subscription(s) at
> http://discuss.develop.com

===================================
This list is hosted by DevelopMentor.  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to