Closed yangleijing closed 1 year ago
Do you mean no log file was created after run process?
The log path has been created, but the log content has not been written. The log only writes the header file content when it is created
------------------ 原始邮件 ------------------ 发件人: "exilon/QuickLogger" @.>; 发送时间: 2022年6月15日(星期三) 凌晨3:43 @.>; @.**@.>; 主题: Re: [exilon/QuickLogger] Linux 使用守护进程 本地日志不能写入 (Issue #73)
Do you mean no log file was created after run process?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Only occurs when you fork?
Yes, as long as the daemon is not used and it works normally in other ways, you can test it
------------------ 原始邮件 ------------------ 发件人: "exilon/QuickLogger" @.>; 发送时间: 2022年6月16日(星期四) 凌晨4:21 @.>; @.**@.>; 主题: Re: [exilon/QuickLogger] Linux 使用守护进程 本地日志不能写入 (Issue #73)
Only occurs when you fork?
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>
Try to provide an absolute path log file.
Closing this issue as it has been inactive for an extended period of time and there has been no recent activity. If this issue is still relevant, please feel free to reopen it with updated information.
if fork()<>0 then begin exit; end;
Logger.CustomTags['MYTAG2'] := FormatDateTime('YYYYMMDD', Now); // Logger.Providers.Add(GlobalLogFileProvider); with GlobalLogFileProvider do begin FileName := './log/'+aLogName+FormatDateTime('YYYYMMDD', Now)+'.log'; LogLevel := LOG_TRACE; TimePrecission := True; MaxRotateFiles := 10; MaxFileSizeInMB := 10; DailyRotate:= True; RotatedFilesPath := './log/Logs'; CompressRotatedFiles := False; // CustomMsgOutput := True; AppName:= 'TaskJob'; CustomFormatOutput := '[%{DATETIME}] [%{LEVEL}] : %{MESSAGE} [%{APPNAME}] [(%{MYTAG2})]'; CustomMsgOutput:= True; Enabled := True; end; //
不能写入本地日志, no find loginfo