1

Topic: LogDataSet causing Log Entry = Internal Error which causing log flush

Good day,

We have following setting in MyApp.sic :

Connections = file(append="true", filename="MyApp.sil", rotate="daily", backlog.enabled="true"), pipe()
DefaultLevel = Debug
Enabled = True
Level = Debug

We use backlog.enabled to avoid any logging unless error detected.

This is what happens when we try to log empty dataset:
http://clevercomponents.com/store/alex/si_logdataset.PNG

Looks like LogDataSet generates Internal Error entry which causing log being saved to the disk.

Thank you,
Alex

Last edited by apoloziouk (2010-07-19 23:36:42)

2

Re: LogDataSet causing Log Entry = Internal Error which causing log flush

Hello Alex,

Looks like LogDataSet generates Internal Error entry which causing log being saved to the disk.

Yes, this is indeed the case. LogDataSet generates an internal error for this because an empty data set is special and this behavior quickly shows you empty data sets in the log. If this behavior is not wanted, you can check the data set for emptiness before calling LogDataSet:

if ADataSet.FieldDefList.Count > 0 then
begin
  SiMain.LogDataSet(.., ADataSet, ..);
end;

You could also put this in a custom log method if you are using this code snippet often.

Regards,
Tobias