• Welcome to Forum.Deepsoftware.Com. Please login or sign up.
 
April 19, 2024, 03:31:44 am

News:

SMF - Just Installed!


TNrLogFile - some problems ...

Started by moelski, September 28, 2010, 08:09:49 pm

Previous topic - Next topic

moelski

Hi Roman,

I have two issues regarding the Log component.

1) How can I disable the file creation? I use the new OnLogEntry feature (thx for this) and don´t need an extra log file on my filesystem.

2) It seems to me that there might be problems if I use nrLog. I have an USB HID device and use the nrHID component to get the data. To decouple the nrHID thread from the main application thread I use windows messages. This worked always fine until I enabled the nrLog to the HID component.
After that time I lost some data. This happens not on all systems and actually I can´t give you a useful hint at which situation the problems happens.  :(
But it´s a fact that disabling the nrLog component results in no data loss.  ???

Do you have an idea what might cause such problems?

Greetz Dominik

Roman Novgorodov

Hello

Thank you for your information.

We will include NO_FILE option into next version of TnrLogFile component.

About data lost. We can not reproduce trouble, but we will try to make logging process more threasafe.

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.

Roman Novgorodov

Hello

I forgot to inform you about following possibility:
You can skip writing log lines into file if you will clear logEntry string before finish OnLogEntry event handler.

procedure TForm1.nrLogFile1LogEntry(Sender: TObject; var logEntry: String);
begin
  logEntry := ''; // skip further processing
end;

I think new option NO_FILE is not necessary. :-)

Roman Novgorodov
DeepSoftware.Com
DeepSoftware llc - The professional components for Delphi/CBuilder/.NET. The high quality custom software development.
Forums.nrCommLib.Com - DeepSoftware Tech Support Forum.