Changeset 156bbd7


Ignore:
Timestamp:
2010-04-13T23:55:30Z (9 years ago)
Author:
Wilmer van der Gaast <wilmer@…>
Branches:
master
Children:
21c87a7, f9ed311
Parents:
c0417e8
Message:

Log to stderr+syslog until daemonized. Current behaviour is too confusing
and annoying.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • bitlbee.c

    rc0417e8 r156bbd7  
    4242        FILE *fp;
    4343       
    44         log_link( LOGLVL_ERROR, LOGOUTPUT_SYSLOG );
    45         log_link( LOGLVL_WARNING, LOGOUTPUT_SYSLOG );
     44        log_link( LOGLVL_ERROR, LOGOUTPUT_CONSOLE );
     45        log_link( LOGLVL_WARNING, LOGOUTPUT_CONSOLE );
    4646       
    4747        memset( &hints, 0, sizeof( hints ) );
     
    146146#endif
    147147       
     148        if( !global.conf->nofork )
     149        {
     150                log_link( LOGLVL_ERROR, LOGOUTPUT_SYSLOG );
     151                log_link( LOGLVL_WARNING, LOGOUTPUT_SYSLOG );
     152        }
     153       
    148154        return( 0 );
    149155}
  • log.c

    rc0417e8 r156bbd7  
    172172                fprintf(stdout, "Debug: %s\n", message);
    173173#endif
     174        /* Always log stuff in syslogs too. */
     175        log_syslog(level, message);
    174176        return;
    175177}
  • unix.c

    rc0417e8 r156bbd7  
    7373       
    7474                i = bitlbee_inetd_init();
    75                 log_message( LOGLVL_INFO, "Bitlbee %s starting in inetd mode.", BITLBEE_VERSION );
     75                log_message( LOGLVL_INFO, "BitlBee %s starting in inetd mode.", BITLBEE_VERSION );
    7676
    7777        }
    7878        else if( global.conf->runmode == RUNMODE_DAEMON )
    7979        {
    80                 log_link( LOGLVL_ERROR, LOGOUTPUT_SYSLOG );
    81                 log_link( LOGLVL_WARNING, LOGOUTPUT_SYSLOG );
     80                log_link( LOGLVL_ERROR, LOGOUTPUT_CONSOLE );
     81                log_link( LOGLVL_WARNING, LOGOUTPUT_CONSOLE );
    8282
    8383                i = bitlbee_daemon_init();
    84                 log_message( LOGLVL_INFO, "Bitlbee %s starting in daemon mode.", BITLBEE_VERSION );
     84                log_message( LOGLVL_INFO, "BitlBee %s starting in daemon mode.", BITLBEE_VERSION );
    8585        }
    8686        else if( global.conf->runmode == RUNMODE_FORKDAEMON )
    8787        {
     88                log_link( LOGLVL_ERROR, LOGOUTPUT_CONSOLE );
     89                log_link( LOGLVL_WARNING, LOGOUTPUT_CONSOLE );
     90
    8891                /* In case the operator requests a restart, we need this. */
    8992                old_cwd = g_malloc( 256 );
     
    9699               
    97100                i = bitlbee_daemon_init();
    98                 log_message( LOGLVL_INFO, "Bitlbee %s starting in forking daemon mode.", BITLBEE_VERSION );
     101                log_message( LOGLVL_INFO, "BitlBee %s starting in forking daemon mode.", BITLBEE_VERSION );
    99102        }
    100103        if( i != 0 )
Note: See TracChangeset for help on using the changeset viewer.