Syslog: allowed underscore symbol in tag (ticket #667).
diff --git a/src/core/ngx_syslog.c b/src/core/ngx_syslog.c
index 616fd71..d4e79f6 100644
--- a/src/core/ngx_syslog.c
+++ b/src/core/ngx_syslog.c
@@ -182,10 +182,11 @@
             for (i = 4; i < len; i++) {
                 c = ngx_tolower(p[i]);
 
-                if (c < '0' || (c > '9' && c < 'a') || c > 'z') {
+                if (c < '0' || (c > '9' && c < 'a' && c != '_') || c > 'z') {
                     ngx_conf_log_error(NGX_LOG_EMERG, cf, 0,
                                        "syslog \"tag\" only allows "
-                                       "alphanumeric characters");
+                                       "alphanumeric characters "
+                                       "and underscore");
                     return NGX_CONF_ERROR;
                 }
             }