PDA

View Full Version : How to set the logfile path run-time


easyblue
09-Sep-2005, 07:53 AM
Hello

Is there any way to set the logfile path at run-time?

Reason:

For security reason, user may not be allow to write to installation folder (restricted user in Windows2000).

So we would like to set the logfile path at run-time, at the starting of application, to such as [My Documents]\[MyApp].

Is there any possible way?

Dietmar Brueckmann
15-Sep-2005, 07:34 AM
Am Fri, 9 Sep 2005 01:53:59 -0500 schrieb easyblue:

> Hello
>
> Is there any way to set the logfile path at run-time?
>
CurrentEurekaLogOptions.OutputPath:= '...';

--
Best regards
Dietmar Brueckmann

easyblue
16-Sep-2005, 01:56 AM
Thanks for the reply, but where is this "CurrentEurekaLogOptions" defined?

I am using C++Builder 6 Ent.

As Eurekalog is enabled through setting in Project->Euerekalog Opinion, so in the source code of my application, I have no definition of this Eurekalog object used by my application.

So my question is rather:

How to access to the Eurekalog object during run-time?

Is there any other way than dropping the Eurekalog component to the form, in each event set the options for the same logfile path, and the these codes be checked everytime?

Can I access the Eurekalog object at the start up of the application, and only set the option for once?

admin
16-Sep-2005, 10:46 AM
easyblue wrote:
> Thanks for the reply, but where is this "CurrentEurekaLogOptions"
> defined?
>
> I am using C++Builder 6 Ent.
>
> As Eurekalog is enabled through setting in Project->Euerekalog Opinion,
> so in the source code of my application, I have no definition of this
> Eurekalog object used by my application.
>
> So my question is rather:
>
> How to access to the Eurekalog object during run-time?
>
> Is there any other way than dropping the Eurekalog component to the
> form, in each event set the options for the same logfile path, and the
> these codes be checked everytime?

You should use the EurekaExceptionRecord.CurrentModuleOptions parameter
field passed in every EurekaLog events.

>
> Can I access the Eurekalog object at the start up of the application,
> and only set the option for once?

Yes, you should use the CurrentEurekaLogOptions function (included in
the ExceptionLog.pas unit).

Example:

CurrentEurekaLogOptions()->OutputPath = "your path";


--
Best regards...

Fabio Dell'Aria.