diff options
Diffstat (limited to 'logging.c')
-rw-r--r-- | logging.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -37,8 +37,8 @@ // If LOG_TOPIC then it expects a string in the format: // :nick!bar@baz TOPIC #channel :bla bla bla // -// With the ":foo!bar@baz "prefix being important for either -// type. +// With the ":foo!bar@baz "prefix being important for all +// types. // // Returns 1 on success or 0 on failure. int logline(char *str, char *ournick, char *basedir, int type) { @@ -106,13 +106,13 @@ int logline(char *str, char *ournick, char *basedir, int type) { // If the message was sent to us, then log it in the sender's log file if (strncmp(tokens[2], ournick, strlen(tokens[0])) == 0) { if (!snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, from)) { - debugprint(DEBUG_CRIT, "Error while log filename for from name, returning!\n"); + debugprint(DEBUG_CRIT, "Error while preparing log filename for from name, returning!\n"); return 0; } } else { // Otherwise log it in the "to" log file if (!snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, to)) { - debugprint(DEBUG_CRIT, "Error while log filename for to name, returning!\n"); + debugprint(DEBUG_CRIT, "Error while preparing log filename for to name, returning!\n"); return 0; } } @@ -187,7 +187,7 @@ int logline(char *str, char *ournick, char *basedir, int type) { stripprefix(str); if (!snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, to)) { - debugprint(DEBUG_CRIT, "Error while log filename for topic, returning!\n"); + debugprint(DEBUG_CRIT, "Error while preparing log filename for topic, returning!\n"); return 0; } @@ -199,7 +199,7 @@ int logline(char *str, char *ournick, char *basedir, int type) { break; default : - printf("Unknown log type '%d', returning 0.\n", type); + debugprint(DEBUG_CRIT, "logline(): Unknown log type '%d', returning 0.\n", type); return 0; } |