X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fframework%2Fmlt_log.c;h=568b2d71b7fc0ce243b720f541c435b08a09fed0;hb=2657693db7ce32ddb0a48b677e4cec6101a35e20;hp=6fb6233ed19ee6cf973889dd4b2a7b2ce6715cff;hpb=114ee1f810399874b21744c0deb743a6f6d258de;p=mlt diff --git a/src/framework/mlt_log.c b/src/framework/mlt_log.c index 6fb6233e..568b2d71 100644 --- a/src/framework/mlt_log.c +++ b/src/framework/mlt_log.c @@ -38,11 +38,17 @@ void default_callback( void* ptr, int level, const char* fmt, va_list vl ) if ( print_prefix && properties ) { char *mlt_type = mlt_properties_get( properties, "mlt_type" ); + char *mlt_service = mlt_properties_get( properties, "mlt_service" ); char *resource = mlt_properties_get( properties, "resource" ); - if ( resource && *resource && resource[0] == '<' && resource[ strlen(resource) - 1 ] == '>' ) - mlt_type = resource; - fprintf( stderr, "[%s @ %p]", mlt_type, ptr ); + if ( !( resource && *resource && resource[0] == '<' && resource[ strlen(resource) - 1 ] == '>' ) ) + mlt_type = mlt_properties_get( properties, "mlt_type" ); + if ( mlt_service ) + fprintf( stderr, "[%s %s] ", mlt_type, mlt_service ); + else + fprintf( stderr, "[%s %p] ", mlt_type, ptr ); + if ( resource ) + fprintf( stderr, "%s\n ", resource ); } print_prefix = strstr( fmt, "\n" ) != NULL; vfprintf( stderr, fmt, vl );