Changeset 72d48b6


Ignore:
Timestamp:
2016-05-01T03:27:28Z (4 years ago)
Author:
dequis <dx@…>
Branches:
master
Children:
4fe91a1
Parents:
720f7a9
Message:

unix.c: Move log_link() calls before plugin initialization

This ensures that plugin load errors are logged instead of thrown away

File:
1 edited

Legend:

Unmodified
Added
Removed
  • unix.c

    r720f7a9 r72d48b6  
    8080        }
    8181
     82        if (global.conf->runmode == RUNMODE_INETD) {
     83                log_link(LOGLVL_ERROR, LOGOUTPUT_IRC);
     84                log_link(LOGLVL_WARNING, LOGOUTPUT_IRC);
     85        } else {
     86                log_link(LOGLVL_ERROR, LOGOUTPUT_CONSOLE);
     87                log_link(LOGLVL_WARNING, LOGOUTPUT_CONSOLE);
     88        }
     89
    8290        b_main_init();
    8391
     
    111119
    112120        if (global.conf->runmode == RUNMODE_INETD) {
    113                 log_link(LOGLVL_ERROR, LOGOUTPUT_IRC);
    114                 log_link(LOGLVL_WARNING, LOGOUTPUT_IRC);
    115 
    116121                i = bitlbee_inetd_init();
    117122                log_message(LOGLVL_INFO, "%s %s starting in inetd mode.", PACKAGE, BITLBEE_VERSION);
    118123
    119124        } else if (global.conf->runmode == RUNMODE_DAEMON) {
    120                 log_link(LOGLVL_ERROR, LOGOUTPUT_CONSOLE);
    121                 log_link(LOGLVL_WARNING, LOGOUTPUT_CONSOLE);
    122 
    123125                i = bitlbee_daemon_init();
    124126                log_message(LOGLVL_INFO, "%s %s starting in daemon mode.", PACKAGE, BITLBEE_VERSION);
    125127        } else if (global.conf->runmode == RUNMODE_FORKDAEMON) {
    126                 log_link(LOGLVL_ERROR, LOGOUTPUT_CONSOLE);
    127                 log_link(LOGLVL_WARNING, LOGOUTPUT_CONSOLE);
    128 
    129128                /* In case the operator requests a restart, we need this. */
    130129                old_cwd = g_malloc(256);
Note: See TracChangeset for help on using the changeset viewer.