[BACK]Return to log-server.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/Attic/log-server.c between version 1.7 and 1.8

version 1.7, 1999/11/10 23:36:44 version 1.8, 1999/11/14 22:28:44
Line 24 
Line 24 
   
 static LogLevel log_level = SYSLOG_LEVEL_INFO;  static LogLevel log_level = SYSLOG_LEVEL_INFO;
 static int log_on_stderr = 0;  static int log_on_stderr = 0;
   static int log_facility = LOG_AUTH;
   
 /* Initialize the log.  /* Initialize the log.
      av0        program name (should be argv[0])       av0        program name (should be argv[0])
Line 33 
Line 34 
   
 void log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)  void log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
 {  {
   int log_facility;  
   
   switch (level)    switch (level)
     {      {
Line 93 
Line 93 
     }      }
   
   log_on_stderr = on_stderr;    log_on_stderr = on_stderr;
   closelog(); /* Close any previous log. */  
   openlog(av0, LOG_PID, log_facility);  
 }  }
   
 #define MSGBUFSIZE 1024  #define MSGBUFSIZE 1024
Line 106 
Line 104 
   char fmtbuf[MSGBUFSIZE];    char fmtbuf[MSGBUFSIZE];
   char *txt = NULL;    char *txt = NULL;
   int pri = LOG_INFO;    int pri = LOG_INFO;
     extern char *__progname;
   
   if (level > log_level)    if (level > log_level)
     return;      return;
Line 143 
Line 142 
   }    }
   if (log_on_stderr)    if (log_on_stderr)
     fprintf(stderr, "%s\n", msgbuf);      fprintf(stderr, "%s\n", msgbuf);
     openlog(__progname, LOG_PID, log_facility);
   syslog(pri, "%.500s", msgbuf);    syslog(pri, "%.500s", msgbuf);
     closelog();
 }  }

Legend:
Removed from v.1.7  
changed lines
  Added in v.1.8