You are not logged in.
Pages: 1
Did anybody notice the recent version of mORMot generates log files that's empty?
I'm not sure since when (maybe about several weeks ago), but this problem wasn't existed since I use mORMot for years
Last edited by edwinsn (2018-04-24 07:54:22)
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
???
What do you call "empty"?
Did never see that, even with latest version of the framework.
There may be something wrong with your code.
Or perhaps the log is seen as "0 bytes" in the File Explorer, but in fact the data is there, and Windows will show the file size only when it is accessed.
In this case, this is a Windows unexpected behavior, which is a "feature", not a "bug", since we are dealing with Windows here.
Online
Hello ab,
Actually, there are two kinds of empty files:
- Log files whose length is 0 byte, and I checked it with a text editor, they are really empty.
- Log files only has some header info, without any log entry, the following is copied from a real-life log file:
C:\_Data\DelphiDev\app1\App\Bin\app1_Server.exe 0.9.8.932 (2016-07-12 13:59:05)
Host=EDWIN-Notepad User=edwin CPU=4*9-6-15620:FFFBEBBFBFFBFA7D OS=11.1=6.1.7601 Wow64=1 Freq=2143496
Environment variables=
TSynLog 1.18.2774 FTS3 2016-07-12T14:49:47
And my code for setting up the logging:
procedure TServerMgr.SetupServerLogging;
begin
TSynLog.Family.Level := LOG_VERBOSE;
TSynLog.Family.AutoFlushTimeOut := 10;
TSynLog.Family.OnArchive := EventArchiveZip;
TSynLog.Family.ArchiveAfterDays := 7;
TSynLog.Family.NoEnvironmentVariable := True;
TSynLog.Family.LocalTimeStamp := True;
TSynLog.Family.DestinationPath := GetServerLogsFolder;
ForceDirectories(TSynLog.Family.DestinationPath);
end;
Any findings
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Oh! I was so wrong! Thanks ab, corrected my program and I'll see what happens
Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.
Offline
Pages: 1