131 |
|
|
132 |
|
|
133 |
/** |
/** |
134 |
* Log a message to monits logfile or syslog. If a TTY exist the log |
* Log a message to monits logfile or syslog. |
|
* message is also sent to stderr. |
|
135 |
* @param s A formated (printf-style) string to log |
* @param s A formated (printf-style) string to log |
136 |
*/ |
*/ |
137 |
void log_log(const char *s, ...) { |
void log_log(const char *s, ...) { |
159 |
} |
} |
160 |
|
|
161 |
nolog: |
nolog: |
162 |
if(Run.have_tty || Run.init) { |
fprintf(stderr, "%s", msg); |
163 |
|
fflush(stderr); |
164 |
fprintf(stderr, "%s", msg); |
|
|
fflush(stderr); |
|
|
|
|
|
} |
|
|
|
|
165 |
FREE(msg); |
FREE(msg); |
166 |
|
|
167 |
} |
} |