[Cherokee-commits] [3650] cherokee/branches/newerrors/cherokee: More LOG_* conversion.
SVN at cherokee-project.com
SVN at cherokee-project.com
Wed Sep 9 22:51:30 CEST 2009
Revision: 3650
http://svn.cherokee-project.com/changeset/3650
Author: alo
Date: 2009-09-09 22:51:29 +0200 (Wed, 09 Sep 2009)
Log Message:
-----------
More LOG_* conversion.
Modified Paths:
--------------
cherokee/branches/newerrors/cherokee/admin_client.c
cherokee/branches/newerrors/cherokee/error_list.py
cherokee/branches/newerrors/cherokee/errors.py
cherokee/branches/newerrors/cherokee/handler_secdownload.c
cherokee/branches/newerrors/cherokee/handler_uwsgi.c
Modified: cherokee/branches/newerrors/cherokee/admin_client.c
===================================================================
--- cherokee/branches/newerrors/cherokee/admin_client.c 2009-09-09 20:06:31 UTC (rev 3649)
+++ cherokee/branches/newerrors/cherokee/admin_client.c 2009-09-09 20:51:29 UTC (rev 3650)
@@ -106,7 +106,7 @@
if ((admin->url_ref == NULL) ||
(admin->poll_ref == NULL))
{
- LOG_CRITICAL_S ("Internal error\n");
+ LOG_CRITICAL_S (CHEROKEE_ERROR_ADMIN_CLIENT_INTERNAL);
return ret_error;
}
@@ -217,8 +217,8 @@
if ((string == NULL) || (strlen(string) == 0)) \
return ret_error; \
if (strncmp (string, substr, sizeof(substr)-1)) { \
- LOG_ERROR ("Uknown response len(" FMT_SIZE "): '%s'\n", \
- (CST_SIZE) strlen(string), string); \
+ LOG_ERROR (CHEROKEE_ERROR_ADMIN_CLIENT_BAD_RESPONSE, \
+ strlen(string), string); \
return ret_error; \
} \
string += sizeof(substr)-1;
@@ -236,7 +236,7 @@
re = strncmp (buf->buf, literal, len);
if (re != 0) {
#if 0
- LOG_ERROR ("Couldn't find len(%d):'%s' in len(%d):'%s'\n",
+ LOG_ERROR (CHEROKEE_ERROR_ADMIN_CLIENT_LITERAL,
strlen(literal), literal, buf->len, buf->buf);
#endif
return ret_error;
Modified: cherokee/branches/newerrors/cherokee/error_list.py
===================================================================
--- cherokee/branches/newerrors/cherokee/error_list.py 2009-09-09 20:06:31 UTC (rev 3649)
+++ cherokee/branches/newerrors/cherokee/error_list.py 2009-09-09 20:51:29 UTC (rev 3650)
@@ -14,6 +14,22 @@
BROKEN_CONFIG = """The configuration file seems to be broken."""
+
+# cherokee/admin_client.c
+#
+e('ADMIN_CLIENT_INTERNAL',
+ title = "Internal error",
+ desc = CODING_BUG)
+
+e('ADMIN_CLIENT_BAD_RESPONSE',
+ title = "Uknown response len(%d): '%s'",
+ desc = CODING_BUG)
+
+e('ADMIN_CLIENT_LITERAL',
+ title = "Could not find len(%d):'%s' in len(%d):'%s'",
+ desc = CODING_BUG)
+
+
# cherokee/handler_*.c
#
e('HANDLER_REGEX_GROUPS',
@@ -25,6 +41,13 @@
desc = BROKEN_CONFIG)
+# cherokee/handler_secdownload.c
+#
+e('HANDLER_SECDOWN_SECRET',
+ title = "Handler secdownload needs a secret",
+ desc = "You must define a passphrase. .. (to-do).")
+
+
# cherokee/handler_server_info.c
#
e('HANDLER_SRV_INFO_MOD',
Modified: cherokee/branches/newerrors/cherokee/errors.py
===================================================================
--- cherokee/branches/newerrors/cherokee/errors.py 2009-09-09 20:06:31 UTC (rev 3649)
+++ cherokee/branches/newerrors/cherokee/errors.py 2009-09-09 20:51:29 UTC (rev 3650)
@@ -113,11 +113,11 @@
content = open (fullpath, 'r').read()
matches_log = re.findall (r'LOG_[\w_]+ ?' +\
- r'\(CHEROKEE_ERROR_([\w_]+)[ ,\n\t]*' +\
+ r'\(CHEROKEE_ERROR_([\w_]+)[ ,\n\t\\]*' +\
r'(.*)\);', content, re.MULTILINE)
matches_errno = re.findall (r'LOG_ERRNO[_S ]*' +\
- r'\(.+,.+,[ \n\t]*CHEROKEE_ERROR_([\w_]+)[ ,\n]*' +\
+ r'\(.+,.+,[ \n\t]*CHEROKEE_ERROR_([\w_]+)[ ,\n\t\\]*' +\
r'(.*)\);', content, re.MULTILINE)
matches = matches_errno + matches_log
Modified: cherokee/branches/newerrors/cherokee/handler_secdownload.c
===================================================================
--- cherokee/branches/newerrors/cherokee/handler_secdownload.c 2009-09-09 20:06:31 UTC (rev 3649)
+++ cherokee/branches/newerrors/cherokee/handler_secdownload.c 2009-09-09 20:51:29 UTC (rev 3650)
@@ -75,7 +75,7 @@
*/
ret = cherokee_config_node_copy (conf, "secret", &props->secret);
if (ret != ret_ok) {
- LOG_CRITICAL_S ("Handler secdownload needs a secret.\n");
+ LOG_CRITICAL_S (CHEROKEE_ERROR_HANDLER_SECDOWN_SECRET);
return ret_error;
}
Modified: cherokee/branches/newerrors/cherokee/handler_uwsgi.c
===================================================================
--- cherokee/branches/newerrors/cherokee/handler_uwsgi.c 2009-09-09 20:06:31 UTC (rev 3649)
+++ cherokee/branches/newerrors/cherokee/handler_uwsgi.c 2009-09-09 20:51:29 UTC (rev 3650)
@@ -90,7 +90,7 @@
/* Final checks
*/
if (props->balancer == NULL) {
- LOG_CRITICAL_S ("ERROR: UWSGI handler needs a balancer\n");
+ LOG_CRITICAL_S (CHEROKEE_ERROR_HANDLER_NO_BALANCER);
return ret_error;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.octality.com/pipermail/cherokee-commits/attachments/20090909/188afc25/attachment.htm
More information about the Cherokee-commits
mailing list