#1 Re: mORMot 1 » TSynLog with support for multiple processes writing to the same log » 2011-10-05 15:27:27

Thanks for your detailed answer! Here is the use cases:

x users working with y applications on z terminal servers, every app needs to write a log file.

Possible solutions:

* every user session writes its own log file (see the disadvantage?)
* one log per application (exe1 -> exe1.log, exe2 -> exe2.log) does not work with basic file open modes like fmShareDenyWrite
* all apps write into one big log file (good for browsing)

Other options:

* write to a central application server with a UDP based service, write to central files from there (this is what I am implementing at the moment).

But I think that writing to the same file from different processes would not be slow. Even if the logging speed is slower with file locking, it is still better than no logging, in production mode apps log only events every couple of seconds.

#2 mORMot 1 » TSynLog with support for multiple processes writing to the same log » 2011-10-05 06:52:44

mjustin
Replies: 3

On Stackoverflow I read about TSynLog. I know a Java logging framework which implements a so called prudent mode which locks files using newer operating system specific API to allow parallel writing (see http://stackoverflow.com/questions/7138 … plemented)

Would this be possible as an improvmenet in TSynLog? As I understand the logback source code, a lock area is created at the end of the log file and released after.

I have seen Delphi code to access the locking API on Stackoverflow and try to find it again if this is interesting. I am also using the log4d (at sourceforge) library and would like to implement it there too as it is our in-house standard logging library...

Regards
Michael Justin

Update:

http://stackoverflow.com/questions/1916 … -in-delphi

shows how a lock can be acquired

#3 mORMot 1 » Usage of a logging framework » 2010-12-14 11:55:18

mjustin
Replies: 12

Hello,

For some areas in the SQLite3 framework, it might be interesting to use some kind of logging framework, for example for

* collecting performance information
* writing generated SQL statements
* notifications about special events
* ...

(a logging framework could also be used by the other parts of the application)

This could be implemented using an existing open source logging library (if the licenses are compatible)

Cheers

Michael

Board footer

Powered by FluxBB