You are not logged in.
Pages: 1
hi,
in mormot.app.agl in constructor TSynAngelize.Create the aLog parameter is not used somewhere. Or I miss something?
Offline
The parent TSynDaemon.Create signature has no aLog parameter:
constructor TSynDaemon.Create(aSettingsClass: TSynDaemonSettingsClass;
const aWorkFolder, aSettingsFolder, aLogFolder,
aSettingsExt, aSettingsName: TFileName;
aSettingsOptions: TSynJsonFileSettingsOptions;
const aSectionName: RawUtf8);
Logging is actually configured via AfterCreate → fSettings.SetLog(TSynLog).
This appears to be dead code - the parameter exists but does nothing.
Offline
Yes, you are both correct!
Please try with
https://github.com/synopse/mORMot2/commit/15dc02feb
Offline
Something I can not understand happens after the above changes.
all logs after Starting procedure are not shown when fork is used in linux. But it works ok with -c switch.
Also, if an exception happens, everything is ok and logs are shown in the file.
Also the service takes the timeout to stop.
Offline
During forking, file handlers are lost. So, if logging have been started with aftercreate, any logging will not be saved.
how can we recreate the file handlers for logging during start procedure and forking?
Offline
I have a derived class from TSynAngelize
I use Tsynlog as argument in the inherited create function
I set Nofile=false, AutoFlushTimeOut=1, Level=[...], PerThreadLog=ptIdentifiedInOneFile after inherited create function.
I use Tsynlog.dolog(...... to write to the log after that.
The logs are shown in the file but everything is not shown in the log after the process forks, except if an exception happens.
Offline
Pages: 1