Changeset 1003


Ignore:
Timestamp:
24/05/06 14:08:04 (13 years ago)
Author:
spascoe
Message:

Logging to syslog has been changed to use LOG_DEBUG. The tests have
been changed to assume messages are logged to /var/log/bbftpd/bbftpd.log.

Location:
TI05-delivery/trunk
Files:
2 edited

Legend:

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

    r988 r1003  
    9999  } 
    100100  else { 
    101     syslog(LOG_INFO, "Received auth message: %s", msg); 
     101    syslog(LOG_DEBUG, "Received auth message: %s", msg); 
    102102  } 
    103103 
     
    126126int bbftpd_private_init(char *logmessage) 
    127127{ 
    128   syslog(LOG_INFO, "initialising private authentication"); 
     128  syslog(LOG_DEBUG, "initialising private authentication"); 
    129129  return 0; 
    130130} 
     
    142142void bbftpd_private_finalise(void) 
    143143{ 
    144   syslog(LOG_INFO, "finalising private authentication in server"); 
     144  syslog(LOG_DEBUG, "finalising private authentication in server"); 
    145145  return; 
    146146} 
     
    157157void bbftpd_private_auth_finalise(void) 
    158158{ 
    159   syslog(LOG_INFO, "finalising private authentication in connection"); 
     159  syslog(LOG_DEBUG, "finalising private authentication in connection"); 
    160160  return; 
    161161} 
     
    185185  switch (msgcode) { 
    186186  case MSG_CHDIR_V2: 
    187     syslog(LOG_INFO, "Authz: MSG_DIR 0x%x %s", transferoption, path); 
     187    syslog(LOG_DEBUG, "Authz: MSG_DIR 0x%x %s", transferoption, path); 
    188188    break; 
    189189  case MSG_LIST_V2: 
    190     syslog(LOG_INFO, "Authz: MSG_LIST_V2 0x%x %s", transferoption, path); 
     190    syslog(LOG_DEBUG, "Authz: MSG_LIST_V2 0x%x %s", transferoption, path); 
    191191    break; 
    192192  case MSG_MKDIR_V2: 
    193     syslog(LOG_INFO, "Authz: MSG_MKDIR_V2 0x%x %s", transferoption, path); 
     193    syslog(LOG_DEBUG, "Authz: MSG_MKDIR_V2 0x%x %s", transferoption, path); 
    194194    break; 
    195195  case MSG_RM: 
    196     syslog(LOG_INFO, "Authz: MSG_RM 0x%x %s", transferoption, path); 
     196    syslog(LOG_DEBUG, "Authz: MSG_RM 0x%x %s", transferoption, path); 
    197197    break; 
    198198  case MSG_STAT: 
    199     syslog(LOG_INFO, "Authz: MSG_STAT 0x%x %s", transferoption, path); 
     199    syslog(LOG_DEBUG, "Authz: MSG_STAT 0x%x %s", transferoption, path); 
    200200    break; 
    201201  case MSG_DF: 
    202     syslog(LOG_INFO, "Authz: MSG_DF 0x%x %s", transferoption, path); 
     202    syslog(LOG_DEBUG, "Authz: MSG_DF 0x%x %s", transferoption, path); 
    203203    break; 
    204204  default: 
     
    229229int bbftpd_private_authz_retr(char *path, char *logmessage) 
    230230{ 
    231   syslog(LOG_INFO, "Authz: RETR %s", path); 
     231  syslog(LOG_DEBUG, "Authz: RETR %s", path); 
    232232  return 0; 
    233233} 
     
    252252int bbftpd_private_authz_store(char *path, char *logmessage) 
    253253{ 
    254   syslog(LOG_INFO, "Authz: STORE %s", path); 
     254  syslog(LOG_DEBUG, "Authz: STORE %s", path); 
    255255  return 0; 
    256256} 
  • TI05-delivery/trunk/test/test_bbftpd.py

    r997 r1003  
    2323 
    2424        # We want to mark the beginning of this test case in syslog 
    25         syslog.openlog('test_bbftpd.py') 
    26         syslog.syslog(syslog.LOG_INFO, 'Starting ExtendedAPITestCase') 
     25        syslog.openlog('test_bbftpd.py', 0, syslog.LOG_LOCAL0) 
     26        syslog.syslog(syslog.LOG_DEBUG, 'Starting ExtendedAPITestCase') 
    2727         
    2828    def tearDown(self): 
    29         syslog.syslog(syslog.LOG_INFO, 'Ended ExtendedAPITestCase') 
     29        syslog.syslog(syslog.LOG_DEBUG, 'Ended ExtendedAPITestCase') 
    3030        syslog.closelog() 
    3131 
     
    146146 
    147147    def _startServer(self): 
    148         os.system('%s -b -l INFORMATION' % self.BBFTPD) 
     148        os.system('%s -b -l DEBUG' % self.BBFTPD) 
    149149 
    150150    def _getServerPids(self): 
     
    164164        raise RuntimeError, 'Failed to stop server' 
    165165 
    166     def _readSyslog(self, logfile="/var/log/messages"): 
     166    def _readSyslog(self, logfile="/var/log/bbftpd/bbftpd.log"): 
    167167        """Get all bbftpd messages from syslog for this test case. 
    168168 
Note: See TracChangeset for help on using the changeset viewer.