diff --git a/configs/logger.conf.sample b/configs/logger.conf.sample
index 09b4b62a116a384cb1578ad56213a25044daba67..17d3cc4200591ac65ca016e504c35ca937826a0d 100644
--- a/configs/logger.conf.sample
+++ b/configs/logger.conf.sample
@@ -69,6 +69,10 @@
 ;
 ; Special filename "console" represents the system console
 ;
+; Filenams can either be relative to the standard Asterisk log directory
+; (see 'astlogdir' in asterisk.conf), or absolute paths that begin with
+; '/'.
+;
 ; We highly recommend that you DO NOT turn on debug mode if you are simply
 ; running a production system.  Debug mode turns on a LOT of extra messages,
 ; most of which you are unlikely to understand without an understanding of
diff --git a/main/logger.c b/main/logger.c
index 72411275def64e8a54beb380952e2daa5db28df7..bceaf092f05d4b26f0782f19aa7116560eccc9f4 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -295,18 +295,12 @@ static struct logchannel *make_logchannel(const char *channel, const char *compo
 		snprintf(chan->filename, sizeof(chan->filename), "%s", channel);
 		openlog("asterisk", LOG_PID, chan->facility);
 	} else {
-		if (channel[0] == '/') {
-			if (!ast_strlen_zero(hostname)) { 
-				snprintf(chan->filename, sizeof(chan->filename), "%s.%s", channel, hostname);
-			} else {
-				ast_copy_string(chan->filename, channel, sizeof(chan->filename));
-			}
-		}		  
-		
 		if (!ast_strlen_zero(hostname)) {
-			snprintf(chan->filename, sizeof(chan->filename), "%s/%s.%s", ast_config_AST_LOG_DIR, channel, hostname);
+			snprintf(chan->filename, sizeof(chan->filename), "%s/%s.%s",
+				 channel[0] != '/' ? ast_config_AST_LOG_DIR : "", channel, hostname);
 		} else {
-			snprintf(chan->filename, sizeof(chan->filename), "%s/%s", ast_config_AST_LOG_DIR, channel);
+			snprintf(chan->filename, sizeof(chan->filename), "%s/%s",
+				 channel[0] != '/' ? ast_config_AST_LOG_DIR : "", channel);
 		}
 		chan->fileptr = fopen(chan->filename, "a");
 		if (!chan->fileptr) {