 |
Crossfire Server, Trunk
1.75.0
|
Go to the documentation of this file.
104 time_t now =
time((time_t *)NULL);
106 time_tmp = localtime(&now);
107 if (time_tmp != NULL) {
114 vsnprintf(
buf,
sizeof(
buf), format, ap);
116 syslog(syslog_pri_map[logLevel],
"%s",
buf);
119 if (time_buf[0] != 0) {
127 if (time_buf[0] != 0) {
128 fputs(time_buf, stderr);
141 perror(
"tried to close log file after SIGHUP in logger.c:LOG()");
146 perror(
"tried to open log file after SIGHUP in logger.c:LOG()");
151 setvbuf(
logfile, NULL, _IOLBF, 0);
155 if (time_buf[0] != 0) {
struct Settings settings
Global settings.
void emergency_save(int flag)
Save all players.
@ llevError
Problems requiring server admin to fix.
void LOG(LogLevel logLevel, const char *format,...)
Logs a message to stderr, or to file.
char * log_timestamp_format
Format for timestap, if log_timestamp is set.
#define MAX_ERRORS
Bail out if more are received during tick.
non standard information is not specified or uptime this means how long since the executable has been started A particular host may have been running a server for quite a long time
logHook log_callback
Log hook, to intercept log messages.
LogLevel debug
Default debugging level.
const char * logfilename
Logfile to use.
long trying_emergency_save
True when emergency_save() is reached.
long nroferrors
If it exceeds MAX_ERRORS, call fatal()
FILE * logfile
Used by server/daemon.c.
void clean_tmp_files(void)
Save unique maps and clean up temporary map files unless recycling temporary maps.
LogLevel
Log levels for the LOG() function.
const char *const loglevel_names[NRLOGLEVELS]
Human-readable name of log levels.
int log_timestamp
If set, log will comport a timestamp.
int exiting
True if the game is about to exit.