/[monit]/monit/log.c
ViewVC logotype

Diff of /monit/log.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.17 by hauk, Sat Oct 25 19:17:10 2003 UTC revision 1.18 by hauk, Wed Nov 12 09:03:20 2003 UTC
# Line 131  int log_init() { Line 131  int log_init() {
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, ...) {
# Line 160  void log_log(const char *s, ...) { Line 159  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  }  }

Legend:
Removed from v.1.17  
changed lines
  Added in v.1.18

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26