Skip to content

Commit

Permalink
Reduced verbosity of a few LOG_WARN messages at startup
Browse files Browse the repository at this point in the history
  • Loading branch information
lminiero committed Jan 21, 2021
1 parent 34f6f89 commit 46a6c71
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void janus_auth_init(gboolean enabled, const char *secret) {
auth_enabled = TRUE;
}
} else {
JANUS_LOG(LOG_WARN, "Token based authentication disabled\n");
JANUS_LOG(LOG_INFO, "Token based authentication disabled\n");
}
janus_mutex_init(&mutex);
}
Expand Down
2 changes: 1 addition & 1 deletion dtls.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ gint janus_dtls_srtp_init(const char *server_pem, const char *server_key, const
#endif

if(!server_pem && !server_key) {
JANUS_LOG(LOG_WARN, "No cert/key specified, autogenerating some...\n");
JANUS_LOG(LOG_INFO, "No cert/key specified, autogenerating some...\n");
if(janus_dtls_generate_keys(&ssl_cert, &ssl_key, rsa_private_key) != 0) {
JANUS_LOG(LOG_FATAL, "Error generating DTLS key/certificate\n");
return -2;
Expand Down
6 changes: 3 additions & 3 deletions janus.c
Original file line number Diff line number Diff line change
Expand Up @@ -1531,7 +1531,7 @@ int janus_process_incoming_request(janus_request *request) {
if(stream != NULL && stream->component != NULL
&& stream->component->dtls != NULL && stream->component->dtls->sctp == NULL) {
/* Create SCTP association as well */
JANUS_LOG(LOG_WARN, "[%"SCNu64"] Creating datachannels...\n", handle->handle_id);
JANUS_LOG(LOG_VERB, "[%"SCNu64"] Creating datachannels...\n", handle->handle_id);
janus_dtls_srtp_create_sctp(stream->component->dtls);
}
}
Expand Down Expand Up @@ -3790,7 +3790,7 @@ json_t *janus_plugin_handle_sdp(janus_plugin_session *plugin_session, janus_plug
if(stream != NULL && stream->component != NULL &&
stream->component->dtls != NULL && stream->component->dtls->sctp == NULL) {
/* Create SCTP association as well */
JANUS_LOG(LOG_WARN, "[%"SCNu64"] Creating datachannels...\n", ice_handle->handle_id);
JANUS_LOG(LOG_VERB, "[%"SCNu64"] Creating datachannels...\n", ice_handle->handle_id);
janus_dtls_srtp_create_sctp(stream->component->dtls);
}
}
Expand Down Expand Up @@ -5016,7 +5016,7 @@ gint main(int argc, char *argv[])
if(item && item->value)
enable_events = janus_is_true(item->value);
if(!enable_events) {
JANUS_LOG(LOG_WARN, "Event handlers support disabled\n");
JANUS_LOG(LOG_INFO, "Event handlers support disabled\n");
} else {
gchar **disabled_eventhandlers = NULL;
path = EVENTDIR;
Expand Down
8 changes: 4 additions & 4 deletions transports/janus_http.c
Original file line number Diff line number Diff line change
Expand Up @@ -773,7 +773,7 @@ int janus_http_init(janus_transport_callbacks *callback, const char *config_path
/* Start with the Janus API web server now */
item = janus_config_get(config, config_general, janus_config_type_item, "http");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "HTTP webserver disabled\n");
JANUS_LOG(LOG_VERB, "HTTP webserver disabled\n");
} else {
uint16_t wsport = 8088;
item = janus_config_get(config, config_general, janus_config_type_item, "port");
Expand Down Expand Up @@ -818,7 +818,7 @@ int janus_http_init(janus_transport_callbacks *callback, const char *config_path
JANUS_LOG(LOG_VERB, "Using certificates:\n\t%s\n\t%s\n", server_pem, server_key);
item = janus_config_get(config, config_general, janus_config_type_item, "https");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "HTTPS webserver disabled\n");
JANUS_LOG(LOG_VERB, "HTTPS webserver disabled\n");
} else {
if(!server_key || !server_pem) {
JANUS_LOG(LOG_FATAL, "Missing certificate/key path\n");
Expand Down Expand Up @@ -849,7 +849,7 @@ int janus_http_init(janus_transport_callbacks *callback, const char *config_path
/* Admin/monitor time: start web server, if enabled */
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_http");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "Admin/monitor HTTP webserver disabled\n");
JANUS_LOG(LOG_VERB, "Admin/monitor HTTP webserver disabled\n");
} else {
uint16_t wsport = 7088;
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_port");
Expand All @@ -876,7 +876,7 @@ int janus_http_init(janus_transport_callbacks *callback, const char *config_path
/* Do we also have to provide an HTTPS one? */
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_https");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "Admin/monitor HTTPS webserver disabled\n");
JANUS_LOG(LOG_VERB, "Admin/monitor HTTPS webserver disabled\n");
} else {
if(!server_key) {
JANUS_LOG(LOG_FATAL, "Missing certificate/key path\n");
Expand Down
4 changes: 2 additions & 2 deletions transports/janus_nanomsg.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ int janus_nanomsg_init(janus_transport_callbacks *callback, const char *config_p
/* Setup the Janus API Nanomsg server(s) */
item = janus_config_get(config, config_general, janus_config_type_item, "enabled");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "Nanomsg server disabled (Janus API)\n");
JANUS_LOG(LOG_VERB, "Nanomsg server disabled (Janus API)\n");
} else {
item = janus_config_get(config, config_general, janus_config_type_item, "address");
const char *address = item && item->value ? item->value : NULL;
Expand Down Expand Up @@ -246,7 +246,7 @@ int janus_nanomsg_init(janus_transport_callbacks *callback, const char *config_p
/* Do the same for the Admin API, if enabled */
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_enabled");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "Nanomsg server disabled (Admin API)\n");
JANUS_LOG(LOG_VERB, "Nanomsg server disabled (Admin API)\n");
} else {
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_address");
const char *address = item && item->value ? item->value : NULL;
Expand Down
6 changes: 3 additions & 3 deletions transports/janus_pfunix.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static janus_mutex clients_mutex = JANUS_MUTEX_INITIALIZER;
static void janus_pfunix_client_free(void *client_ref) {
if(!client_ref)
return;
JANUS_LOG(LOG_WARN, "Freeing unix sockets client\n");
JANUS_LOG(LOG_INFO, "Freeing unix sockets client\n");
janus_pfunix_client *client = (janus_pfunix_client *) client_ref;
if(client->messages != NULL) {
char *response = NULL;
Expand Down Expand Up @@ -282,7 +282,7 @@ int janus_pfunix_init(janus_transport_callbacks *callback, const char *config_pa
/* Setup the Janus API Unix Sockets server(s) */
item = janus_config_get(config, config_general, janus_config_type_item, "enabled");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "Unix Sockets server disabled (Janus API)\n");
JANUS_LOG(LOG_VERB, "Unix Sockets server disabled (Janus API)\n");
} else {
item = janus_config_get(config, config_general, janus_config_type_item, "path");
char *pfname = (char *)(item && item->value ? item->value : NULL);
Expand Down Expand Up @@ -313,7 +313,7 @@ int janus_pfunix_init(janus_transport_callbacks *callback, const char *config_pa
/* Do the same for the Admin API, if enabled */
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_enabled");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "Unix Sockets server disabled (Admin API)\n");
JANUS_LOG(LOG_VERB, "Unix Sockets server disabled (Admin API)\n");
} else {
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_path");
char *pfname = (char *)(item && item->value ? item->value : NULL);
Expand Down
4 changes: 2 additions & 2 deletions transports/janus_rabbitmq.c
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ int janus_rabbitmq_init(janus_transport_callbacks *callback, const char *config_
}
}
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "RabbitMQ support disabled (Janus API)\n");
JANUS_LOG(LOG_VERB, "RabbitMQ support disabled (Janus API)\n");
} else {
/* Parse configuration */
item = janus_config_get(config, config_general, janus_config_type_item, "to_janus");
Expand Down Expand Up @@ -346,7 +346,7 @@ int janus_rabbitmq_init(janus_transport_callbacks *callback, const char *config_
}
}
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "RabbitMQ support disabled (Admin API)\n");
JANUS_LOG(LOG_VERB, "RabbitMQ support disabled (Admin API)\n");
} else {
/* Parse configuration */
item = janus_config_get(config, config_admin, janus_config_type_item, "to_janus_admin");
Expand Down
8 changes: 4 additions & 4 deletions transports/janus_websockets.c
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ int janus_websockets_init(janus_transport_callbacks *callback, const char *confi
/* Setup the Janus API WebSockets server(s) */
item = janus_config_get(config, config_general, janus_config_type_item, "ws");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "WebSockets server disabled\n");
JANUS_LOG(LOG_VERB, "WebSockets server disabled\n");
} else {
uint16_t wsport = 8188;
item = janus_config_get(config, config_general, janus_config_type_item, "ws_port");
Expand Down Expand Up @@ -648,7 +648,7 @@ int janus_websockets_init(janus_transport_callbacks *callback, const char *confi
}
item = janus_config_get(config, config_general, janus_config_type_item, "wss");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "Secure WebSockets server disabled\n");
JANUS_LOG(LOG_VERB, "Secure WebSockets server disabled\n");
} else {
uint16_t wsport = 8989;
item = janus_config_get(config, config_general, janus_config_type_item, "wss_port");
Expand Down Expand Up @@ -719,7 +719,7 @@ int janus_websockets_init(janus_transport_callbacks *callback, const char *confi
/* Do the same for the Admin API, if enabled */
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_ws");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "Admin WebSockets server disabled\n");
JANUS_LOG(LOG_VERB, "Admin WebSockets server disabled\n");
} else {
uint16_t wsport = 7188;
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_ws_port");
Expand Down Expand Up @@ -765,7 +765,7 @@ int janus_websockets_init(janus_transport_callbacks *callback, const char *confi
}
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_wss");
if(!item || !item->value || !janus_is_true(item->value)) {
JANUS_LOG(LOG_WARN, "Secure Admin WebSockets server disabled\n");
JANUS_LOG(LOG_VERB, "Secure Admin WebSockets server disabled\n");
} else {
uint16_t wsport = 7989;
item = janus_config_get(config, config_admin, janus_config_type_item, "admin_wss_port");
Expand Down

0 comments on commit 46a6c71

Please sign in to comment.