Ignore:
Timestamp:
26/07/06 11:18:55 (13 years ago)
Author:
spascoe
Message:

I've created a bbftpd log facility to replace syslog.
At present it allows you to log messages to a file in addition
to syslog. This should help testing on other machines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/bbftp-server-3.2.0/bbftpd/ndg.c

    r1289 r1328  
    4747    return -1; 
    4848  } 
    49   syslog(LOG_DEBUG, "Received auth message: %s", msg); 
     49  bbftpd_log(LOG_DEBUG, "Received auth message: %s", msg); 
    5050  free(msg); 
    5151 
     
    6060  } 
    6161 
    62   syslog(LOG_INFO, "Private string: %s", privatestr); 
     62  bbftpd_log(LOG_INFO, "Private string: %s", privatestr); 
    6363  free(privatestr); 
    6464 
     
    9797  switch (msgcode) { 
    9898  case MSG_CHDIR_V2: 
    99     syslog(LOG_DEBUG, "Authz: MSG_DIR 0x%x %s", transferoption, path); 
     99    bbftpd_log(LOG_DEBUG, "Authz: MSG_DIR 0x%x %s", transferoption, path); 
    100100    break; 
    101101  case MSG_LIST_V2: 
    102     syslog(LOG_DEBUG, "Authz: MSG_LIST_V2 0x%x %s", transferoption, path); 
     102    bbftpd_log(LOG_DEBUG, "Authz: MSG_LIST_V2 0x%x %s", transferoption, path); 
    103103    break; 
    104104  case MSG_MKDIR_V2: 
    105     syslog(LOG_DEBUG, "Authz: MSG_MKDIR_V2 0x%x %s", transferoption, path); 
     105    bbftpd_log(LOG_DEBUG, "Authz: MSG_MKDIR_V2 0x%x %s", transferoption, path); 
    106106    break; 
    107107  case MSG_RM: 
    108     syslog(LOG_DEBUG, "Authz: MSG_RM 0x%x %s", transferoption, path); 
     108    bbftpd_log(LOG_DEBUG, "Authz: MSG_RM 0x%x %s", transferoption, path); 
    109109    break; 
    110110  case MSG_STAT: 
    111     syslog(LOG_DEBUG, "Authz: MSG_STAT 0x%x %s", transferoption, path); 
     111    bbftpd_log(LOG_DEBUG, "Authz: MSG_STAT 0x%x %s", transferoption, path); 
    112112    break; 
    113113  case MSG_DF: 
    114     syslog(LOG_DEBUG, "Authz: MSG_DF 0x%x %s", transferoption, path); 
     114    bbftpd_log(LOG_DEBUG, "Authz: MSG_DF 0x%x %s", transferoption, path); 
    115115    break; 
    116116  default: 
     
    139139int bbftpd_private_authz_retr(char *path, char *logmessage) 
    140140{ 
    141   syslog(LOG_DEBUG, "Authz: RETR %s", path); 
     141  bbftpd_log(LOG_DEBUG, "Authz: RETR %s", path); 
    142142 
    143143#ifdef NDG_PYTHON_EMBED 
     
    160160int bbftpd_private_authz_store(char *path, char *logmessage) 
    161161{ 
    162   syslog(LOG_DEBUG, "Authz: STORE %s", path); 
     162  bbftpd_log(LOG_DEBUG, "Authz: STORE %s", path); 
    163163 
    164164#ifdef NDG_PYTHON_EMBED 
Note: See TracChangeset for help on using the changeset viewer.