QuickLogger icon indicating copy to clipboard operation
QuickLogger copied to clipboard

Linux 使用守护进程 本地日志不能写入

Open yangleijing opened this issue 3 years ago • 5 comments

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

yangleijing avatar Jun 14 '22 09:06 yangleijing

Do you mean no log file was created after run process?

exilon avatar Jun 14 '22 19:06 exilon

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: @.***>

yangleijing avatar Jun 15 '22 01:06 yangleijing

Only occurs when you fork?

exilon avatar Jun 15 '22 20:06 exilon

  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: @.***>

yangleijing avatar Jun 16 '22 01:06 yangleijing

Try to provide an absolute path log file.

exilon avatar Jul 07 '22 19:07 exilon

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.

exilon avatar May 01 '23 17:05 exilon