Changeset 5280


Ignore:
Timestamp:
Mar 18, 2008, 2:23:39 AM (14 years ago)
Author:
charles
Message:

if libevent logs an error message, send it to our message log via tr_nerr()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libtransmission/trevent.c

    r5065 r5280  
    149149logFunc( int severity, const char * message )
    150150{
    151     switch( severity )
    152     {
    153         case _EVENT_LOG_DEBUG:
    154             tr_dbg( "%s", message );
    155             break;
    156         case _EVENT_LOG_ERR:
    157             tr_err( "%s", message );
    158             break;
    159         default:
    160             tr_inf( "%s", message );
    161             break;
    162     }
     151    if( severity >= _EVENT_LOG_ERR )
     152        tr_nerr( "%s", message );
     153    else
     154        tr_ndbg( "%s", message );
    163155}
    164156
     
    175167
    176168    eh->base = event_init( );
     169    event_set_log_callback( logFunc );
    177170    timeout_set( &eh->pulse, pumpList, veh );
    178171    timeout_add( &eh->pulse, &eh->pulseInterval );
Note: See TracChangeset for help on using the changeset viewer.