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/createadir.c

    r773 r1328  
    3737                                    - Correct typo 
    3838              v 2.0.1  2001/04/23   - Correct indentation 
    39               v 2.1.0  2001/05/30   - Correct syslog level 
     39              v 2.1.0  2001/05/30   - Correct bbftpd_log level 
    4040                                       
    4141 *****************************************************************************/ 
     
    4444#include <netinet/in.h> 
    4545#include <stdio.h> 
    46 #include <syslog.h> 
     46#include <bbftpd_log.h> 
    4747#include <sys/stat.h> 
    4848#include <sys/types.h> 
     
    7272        ** big 
    7373        */ 
    74         syslog(BBFTPD_ERR,"Message to big in createdir (%d,%d)",msglen,MAXMESSLEN) ; 
     74        bbftpd_log(BBFTPD_ERR,"Message to big in createdir (%d,%d)",msglen,MAXMESSLEN) ; 
    7575        reply(MSG_BAD_NO_RETRY,"Directory too long") ; 
    7676        return -1 ; 
     
    9090    receive_buffer[msglen] = '\0' ; 
    9191    if ( code == MSG_MKDIR ) { 
    92         syslog(BBFTPD_DEBUG,"Creating directory %s",receive_buffer) ; 
     92        bbftpd_log(BBFTPD_DEBUG,"Creating directory %s",receive_buffer) ; 
    9393    } 
    9494    /* 
     
    102102        savederrno = errno ; 
    103103        sprintf(logmessage,"Error creation directory %s : %s",receive_buffer,strerror(errno)) ; 
    104         syslog(BBFTPD_ERR,"Error creation directory %s : %s",receive_buffer,strerror(errno)) ; 
     104        bbftpd_log(BBFTPD_ERR,"Error creation directory %s : %s",receive_buffer,strerror(errno)) ; 
    105105        /* 
    106106        ** We tell the client not to retry in the following case (even in waiting 
Note: See TracChangeset for help on using the changeset viewer.