This wiki page contains an overview of currently existing logging and rotation mechanisms in HTCondor. {subsection: What is there?} {code} - dprintf - user logs - event logs - history files - quill logs {endcode} {subsection: Current API of the individual logging methods} ---------------------------------- User Log: ---------------------------------- Writer- and Reader-class : WriteUserLog and ReadUserLog - WriteUserLog 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 .x, where .1 is the most recently created file (apart from simply , which is the current log file) A rename has to take place for all existing archived log files for every rotation. ---------------------------------- Event Log: ---------------------------------- UserLog API, different semantics ---------------------------------- dprintf: ---------------------------------- - initially used by daemon core with several different declarations {code} -- void dprintf( int flags, char* fmt, ... ) CHECK_PRINTF_FORMAT(3,4) -- void dprintf( int, const char*, ... ) -- void dprintf( int, char* ... ) -- void dprintf( int level ) const -- void dprintf(unsigned int lvl) -- void dprintf ( int flags, const char* fmt, ... ) CHECK_PRINTF_FORMAT(2,3) -- void dprintf () {endcode} ---------------------------------- Quill: ---------------------------------- uses daemon core dprintf {subsection: Current semantics} TODO {subsection: Some commonly used logging/rotation tools } syslog : typically system administrator determines log destination, not software {linebreak} Log4J : Apache logging tool for Java {linebreak} Log4CPP : Logging tool for C++ modeled after Log4J{linebreak} Log4C : --- " ---- for C {linebreak}