Commit 461a5375 authored by ePirat's avatar ePirat

More detailed logging

Add source IP adress to startup and source exit logging, see #2016
Add mountpoint to some log lines, see #1388


svn path=/icecast/trunk/icecast/; revision=19250
parent 634ab4ff
...@@ -1036,7 +1036,8 @@ int connection_check_pass (http_parser_t *parser, const char *user, const char * ...@@ -1036,7 +1036,8 @@ int connection_check_pass (http_parser_t *parser, const char *user, const char *
/* only called for native icecast source clients */ /* only called for native icecast source clients */
static void _handle_source_request (client_t *client, const char *uri) static void _handle_source_request (client_t *client, const char *uri)
{ {
LOG_INFO("Source logging in at mountpoint \"%s\"", uri); LOG_INFO("Source logging in at mountpoint \"%s\" from %s",
uri, client->con->ip);
if (uri[0] != '/') if (uri[0] != '/')
{ {
......
...@@ -792,7 +792,7 @@ void source_main (source_t *source) ...@@ -792,7 +792,7 @@ void source_main (source_t *source)
avl_delete(source->pending_tree, (void *)client, _free_client); avl_delete(source->pending_tree, (void *)client, _free_client);
LOG_INFO("Client deleted, exceeding maximum listeners for this " LOG_INFO("Client deleted, exceeding maximum listeners for this "
"mountpoint."); "mountpoint (%s).", source->mount);
continue; continue;
} }
...@@ -800,7 +800,7 @@ void source_main (source_t *source) ...@@ -800,7 +800,7 @@ void source_main (source_t *source)
avl_insert(source->client_tree, client_node->key); avl_insert(source->client_tree, client_node->key);
source->listeners++; source->listeners++;
LOG_DEBUG("Client added"); LOG_DEBUG("Client added for mountpoint (%s)", source->mount);
stats_event_inc(source->mount, "connections"); stats_event_inc(source->mount, "connections");
client_node = avl_get_next(client_node); client_node = avl_get_next(client_node);
...@@ -869,7 +869,7 @@ static void source_shutdown (source_t *source) ...@@ -869,7 +869,7 @@ static void source_shutdown (source_t *source)
mount_proxy *mountinfo; mount_proxy *mountinfo;
source->running = 0; source->running = 0;
LOG_INFO("Source \"%s\" exiting", source->mount); LOG_INFO("Source from %s at \"%s\" exiting", source->con->ip, source->mount);
mountinfo = config_find_mount (config_get_config(), source->mount, MOUNT_TYPE_NORMAL); mountinfo = config_find_mount (config_get_config(), source->mount, MOUNT_TYPE_NORMAL);
if (mountinfo) if (mountinfo)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment