View Full Version : Logfile in stream?
valik
24-Feb-2006, 07:08 PM
I'm testing EurekaLog Trial now and I've found the following problem. Our product uses its own mailing system (it's realized via some Oracle package) and I need to get .ELF file in stream, so I can save it into a BLOB. Is there any way to do this? I can't use saving to file and then loading it into stream because of permissions for saving files on customer's computer. I know that I can generate .ELF file by assembling information from TEurekaExceptionRecord, but it's not the way I want to do it.
Can you help me?
Thanks
User "valik" <valik@sefira.cz> wrote...
>
> I'm testing EurekaLog Trial now and I've found the following problem.
> Our product uses its own mailing system (it's realized via some Oracle
> package) and I need to get .ELF file in stream, so I can save it into a
> BLOB. Is there any way to do this? I can't use saving to file and then
> loading it into stream because of permissions for saving files on
> customer's computer. I know that I can generate .ELF file by assembling
> information from TEurekaExceptionRecord, but it's not the way I want to
> do it.
Hello!
I'm not admin but I have to say: it's a good suggestion :)
--
Greetings
Tomski
admin
27-Feb-2006, 10:34 AM
Hi,
valik wrote:
> I'm testing EurekaLog Trial now and I've found the following problem.
> Our product uses its own mailing system (it's realized via some Oracle
> package) and I need to get .ELF file in stream, so I can save it into a
> BLOB. Is there any way to do this? I can't use saving to file and then
> loading it into stream because of permissions for saving files on
> customer's computer. I know that I can generate .ELF file by assembling
> information from TEurekaExceptionRecord, but it's not the way I want to
> do it.
>
> Can you help me?
>
>
> Thanks
But the entire Log file it's just available as
TEurekaExceptionRecord.LogText field. So you can just save it into a
TStream as the following example shows:
uses
ExceptionLog; // The required unit.
procedure TForm1.EurekaLog1ExceptionNotify(
EurekaExceptionRecord: TEurekaExceptionRecord; var Handled: Boolean);
var
LogMem: TMemoryStream;
begin
LogMem := TMemoryStream.Create;
try
LogMem.Write(
EurekaExceptionRecord.LogText[1],
Length(EurekaExceptionRecord.LogText));
// Use your stream here!!! :)
finally
LogMem.Free;
end;
end;
I hope to have answered to your question otherwise don't hesitate to
recontact me, ok? :)
--
Best regards...
Fabio Dell'Aria.
----------------
http://www.eurekalog.com
Catch every BUG, every time!
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.