#1 Re: mORMot 1 » log stack with two services » 2020-06-29 09:17:11

Thank you very much for your response. I have changed the code to use the metaclass. where is the best place to set the values of the meta class TSynLog?
1. dpr after the begin?
2. initialization on the thread class?
3. initialization  on the service class?
4. on the on start even of the service?
5. on the execute of the thread?

#2 mORMot 1 » log stack with two services » 2020-06-28 10:49:12

vjpbiuh
Replies: 3

hey,

After Creating 2 services , the log get stuck.
c:\mik4win\Service.exe 1.0.0.0 (2020-06-24 14:00:56)
.. some computer data here...
TSynLog 1.18.5369 2020-06-28T10:26:49


and it hangs there.
the process is not login

the log is defined as such:

var
  Log: TSynLog;

function InitLogger :TSynLog ;
begin
with TSynLog.Family do begin
    Level := LOG_VERBOSE;
    Level := [sllInfo,sllException,sllExceptionOS];
    PerThreadLog := ptOneFilePerThread;
    OnArchive := EventArchiveSynLZ;
    ArchiveAfterDays := 3; // archive after one day
    RotateFileCount := 7;        // will maintain a set of up to 5 files
    RotateFileSizeKB := 1024; // rotate by 1 MB logs
    DestinationPath := 'c:\folder\';
  end;
  Result   := TSynLogClass.Create(TSynLog.Family);
end;

using version 1.18

any idea why?
anyone tried testing the logger with services?

Board footer

Powered by FluxBB