You are not logged in.
Pages: 1
Trying to use angelize I noticed that aLog in the constructor is not used anywhere. Do I miss something?
constructor TSynAngelize.Create(aServiceClass: TSynAngelizeServiceClass;
aLog: TSynLogClass; const aSectionName: RawUtf8;
const aWorkFolder, aSettingsFolder, aLogFolder, aSettingsExt, aSettingsName: TFileName;
aSettingsOptions: TSynJsonFileSettingsOptions);
Secondly, when in windows I start the agl with the -c parameter every log entry created with TSynlog.Add exists in the log file. When I started as a windows service with /start parameter, only log entries before starting the services are logged.
Where the logs entries go?
Thanks in advance
Offline
You are right: TSynLog process is defined by TSynAngelizeSettings.LogClass.
This parameter is not used.
In fact, this low-level TSynLog may be confusing.
In fact, Start calls SetLog() and therefore follow TSynAngelizeSettings.Log/LogPath/LogRotateFileCount parameters.
If you don't overwrite any settings in those fields, you won't have any logs once started.
Offline
In fact, Start calls SetLog() and therefore follow TSynAngelizeSettings.Log/LogPath/LogRotateFileCount parameters.
If you don't overwrite any settings in those fields, you won't have any logs once started.
With the same code from my part I see a difference between running alg with the -c parameter and /start parameter in windows (compiled with Delphi 12)
When running with the -c parameter as console application that waits the "Enter" to finish, everything is OK
When running with the /start parameter as a windows service then log entries come only from the starting process and stops to
20250113 10272931 ! debug mormot.core.os.TServiceController(02ea5658) Start(agl) Args=0 Handle=17568712
No more log entries from the running service can be found in the log, till I stop the service.
Running as a service does not write any log entries to the file. Are they redirected somewhere else?
Offline
Pages: 1