Page History
- 2012-Nov-13 16:50 adesmet
- 2010-Jan-08 10:28 cweiss
- 2009-Dec-22 16:57 cweiss
- 2009-Dec-15 16:41 cweiss
- 2009-Dec-15 16:39 cweiss
What is there?
- dprintf - user logs - event logs - history files - quill logs
Current API of the individual logging methods
User Log:
Writer- and Reader-class : WriteUserLog and ReadUserLog
May be global, may write out as XML
- Instantiation: WriteUserLog(const char *owner, const char *domain, const char *file, int clu, int proc, int subp, bool xml = XML_USERLOG_DEFAULT, const char *gjid = NULL);
WriteUserLog(const char *owner, const char *file, int clu, int proc, int subp, bool xml = XML_USERLOG_DEFAULT);
Also empty constructor possible, but that means that initialization has to be done separately.
- Usage: bool writeEvent (ULogEvent *event, ClassAd *jobad = NULL, bool *written = NULL );
Problem: This function returns success, even if no initialization was made (and therefore nothing was written)
- Locking: - in write process: FileLockBase: lock on file is obtained lock is released upon completion
private function for writing/locking: doWriteEvent(...)
- Rotation: int doRotation( const char *path, FILE *&fp, MyString &rotated, int max_rotations );
log files are named <name>.x, where <name>.1 is the most recently created file (apart from simply <name>, which is the current log file) A rename has to take place for all existing archived log files for every rotation.
Current semantics
TODO
Some commonly used logging/rotation tools
Tool | Advantages | Disadvantages | Important Features |
|
|
|
|
|
|
|
|
|
|
|
|
TODO
Under construction