libobs: Reduce unnecessary logging (info -> debug)

(Note: This commit also modifies coreaudio-encoder, win-capture, and
win-mf modules)

This reduces logging to the user's log file.  Most of the things
specified are not useful for examining log files, and make reading log
files more painful.

The things that are useful to log should be up to the front-end to
implement.  The core and core plugins should have minimal mandatory
logging.
This commit is contained in:
jp9000 2016-08-05 15:36:10 -07:00
parent ed829e93ae
commit 526d390adb
9 changed files with 16 additions and 21 deletions

View File

@ -108,7 +108,7 @@ static struct obs_encoder *create_encoder(const char *id,
&obs->data.encoders_mutex,
&obs->data.first_encoder);
blog(LOG_INFO, "encoder '%s' (%s) created", name, id);
blog(LOG_DEBUG, "encoder '%s' (%s) created", name, id);
return encoder;
}
@ -229,7 +229,7 @@ static void obs_encoder_actually_destroy(obs_encoder_t *encoder)
da_free(encoder->outputs);
pthread_mutex_unlock(&encoder->outputs_mutex);
blog(LOG_INFO, "encoder '%s' destroyed", encoder->context.name);
blog(LOG_DEBUG, "encoder '%s' destroyed", encoder->context.name);
free_audio_buffers(encoder);

View File

@ -84,7 +84,7 @@ int obs_open_module(obs_module_t **module, const char *path,
if (!module || !path || !obs)
return MODULE_ERROR;
blog(LOG_INFO, "---------------------------------");
blog(LOG_DEBUG, "---------------------------------");
mod.module = os_dlopen(path);
if (!mod.module) {
@ -104,7 +104,7 @@ int obs_open_module(obs_module_t **module, const char *path,
mod.next = obs->first_module;
if (mod.file) {
blog(LOG_INFO, "Loading module: %s", mod.file);
blog(LOG_DEBUG, "Loading module: %s", mod.file);
}
*module = bmemdup(&mod, sizeof(mod));

View File

@ -146,7 +146,7 @@ obs_output_t *obs_output_create(const char *id, const char *name,
&obs->data.outputs_mutex,
&obs->data.first_output);
blog(LOG_INFO, "output '%s' (%s) created", name, id);
blog(LOG_DEBUG, "output '%s' (%s) created", name, id);
return output;
fail:
@ -166,7 +166,7 @@ void obs_output_destroy(obs_output_t *output)
if (output) {
obs_context_data_remove(&output->context);
blog(LOG_INFO, "output '%s' destroyed", output->context.name);
blog(LOG_DEBUG, "output '%s' destroyed", output->context.name);
if (output->valid && active(output))
obs_output_actual_stop(output, true, 0);

View File

@ -66,8 +66,7 @@ static obs_service_t *obs_service_create_internal(const char *id,
&obs->data.services_mutex,
&obs->data.first_service);
blog(private ? LOG_DEBUG : LOG_INFO, "service '%s' (%s) created",
name, id);
blog(LOG_DEBUG, "service '%s' (%s) created", name, id);
return service;
}
@ -92,8 +91,7 @@ static void actually_destroy_service(struct obs_service *service)
if (service->output)
service->output->service = NULL;
blog(service->context.private ? LOG_DEBUG : LOG_INFO,
"service '%s' destroyed", service->context.name);
blog(LOG_DEBUG, "service '%s' destroyed", service->context.name);
obs_context_data_free(&service->context);
if (service->owns_info_id)

View File

@ -338,7 +338,7 @@ static obs_source_t *obs_source_create_internal(const char *id,
if (!source->context.data)
blog(LOG_ERROR, "Failed to create source '%s'!", name);
blog(private ? LOG_DEBUG : LOG_INFO, "%ssource '%s' (%s) created",
blog(LOG_DEBUG, "%ssource '%s' (%s) created",
private ? "private " : "", name, id);
obs_source_dosignal(source, "source_create", NULL);
@ -490,8 +490,7 @@ void obs_source_destroy(struct obs_source *source)
obs_context_data_remove(&source->context);
blog(source->context.private ? LOG_DEBUG : LOG_INFO,
"%ssource '%s' destroyed",
blog(LOG_DEBUG, "%ssource '%s' destroyed",
source->context.private ? "private " : "",
source->context.name);
@ -1864,8 +1863,7 @@ void obs_source_filter_add(obs_source_t *source, obs_source_t *filter)
signal_handler_signal(source->context.signals, "filter_add", &cd);
if (source && filter)
blog(source->context.private ? LOG_DEBUG : LOG_INFO,
"- filter '%s' (%s) added to source '%s'",
blog(LOG_DEBUG, "- filter '%s' (%s) added to source '%s'",
filter->context.name, filter->info.id,
source->context.name);
}
@ -1901,8 +1899,7 @@ static bool obs_source_filter_remove_refless(obs_source_t *source,
signal_handler_signal(source->context.signals, "filter_remove", &cd);
if (source && filter)
blog(source->context.private ? LOG_DEBUG : LOG_INFO,
"- filter '%s' (%s) removed from source '%s'",
blog(LOG_DEBUG, "- filter '%s' (%s) removed from source '%s'",
filter->context.name, filter->info.id,
source->context.name);

View File

@ -189,7 +189,7 @@ static void PopulateBitrateMap()
<< " kbit/s: '" << EncoderName(entry.second) << "' ("
<< entry.second << ')';
blog(LOG_INFO, "AAC encoder bitrate mapping:%s",
blog(LOG_DEBUG, "AAC encoder bitrate mapping:%s",
ss.str().c_str());
});
}

View File

@ -413,7 +413,7 @@ static bool load_lib(void)
#define LOAD_LIB(x, n) x = LoadLibrary(TEXT(n)); \
if (!x) \
CA_LOG(LOG_WARNING, "Failed loading library '" n "'");
CA_LOG(LOG_DEBUG, "Failed loading library '" n "'");
LOAD_LIB(audio_toolbox, "CoreAudioToolbox.dll");
#undef LOAD_LIB

View File

@ -32,7 +32,7 @@ bool DeckLinkDeviceDiscovery::Init(void)
initialized = result == S_OK;
if (!initialized)
blog(LOG_INFO, "Failed to start search for DeckLink devices");
blog(LOG_DEBUG, "Failed to start search for DeckLink devices");
return initialized;
}

View File

@ -158,7 +158,7 @@ extern "C" void RegisterMFAACEncoder()
info.get_extra_data = MFAAC_GetExtraData;
info.get_audio_info = MFAAC_GetAudioInfo;
MF_LOG(LOG_INFO, "Adding Media Foundation AAC Encoder");
MF_LOG(LOG_DEBUG, "Adding Media Foundation AAC Encoder");
obs_register_encoder(&info);