mcabber/src/logprint.h
author Mikael Berthe <mikael@lilotux.net>
Mon, 25 Jul 2005 21:46:35 +0100
changeset 374 bd5638c21834
child 576 8b3db0b555a1
permissions -rw-r--r--
Improve logging system (traces) There are now two trace logging levels: * tracelog_level = 1: Most messages from the log window are written to disk (LPRINT_LOG) * tracelog_level =2: LPRINT_LOG & LPRINT_DEBUG messages are written to disk The trace file name is set with the "tracelog_file" option.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
374
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     1
#ifndef __LOGPRINT_H__
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     2
#define __LOGPRINT_H__ 1
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     3
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     4
// Flags for scr_LogPrint()
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     5
#define LPRINT_NORMAL   1   // Display in log window
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     6
#define LPRINT_LOG      2   // Log to file (if enabled)
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     7
#define LPRINT_DEBUG    4   // Debug message (log if enabled)
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     8
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
     9
// For convenience...
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    10
#define LPRINT_LOGNORM  (LPRINT_NORMAL|LPRINT_LOG)
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    11
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    12
void scr_LogPrint(unsigned int flag, const char *fmt, ...);
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    13
bd5638c21834 Improve logging system (traces)
Mikael Berthe <mikael@lilotux.net>
parents:
diff changeset
    14
#endif /* __LOGPRINT_H__ */