summaryrefslogtreecommitdiff
path: root/logging.c
diff options
context:
space:
mode:
Diffstat (limited to 'logging.c')
-rw-r--r--logging.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/logging.c b/logging.c
index a4698c6..dcadb26 100644
--- a/logging.c
+++ b/logging.c
@@ -55,7 +55,7 @@ int logline(char *str, char *ournick, char *basedir, int type) {
}
// Copy into the token array (strlen + 1 to get the NULL terminator)
strncpy(tokens[i], token, strlen(token) + 1);
- printf("logline(): extracted '%s'.\n", tokens[i]);
+ debugprint("logline(): extracted '%s'.\n", tokens[i]);
}
switch(type) {
@@ -75,7 +75,7 @@ int logline(char *str, char *ournick, char *basedir, int type) {
snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, tokens[2]);
}
- printf("logline(): Logging PRIVMSG from '%s' to '%s' message '%s' in filename '%s'.\n", tokens[0], tokens[2], str, filename);
+ debugprint("logline(): Logging PRIVMSG from '%s' to '%s' message '%s' in filename '%s'.\n", tokens[0], tokens[2], str, filename);
break;
@@ -95,7 +95,7 @@ int logline(char *str, char *ournick, char *basedir, int type) {
snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, tokens[2] + pos);
- printf("logline(): Logging JOIN/PART to/from '%s' in filename '%s'.\n", tokens[2] + pos, filename);
+ debugprint("logline(): Logging JOIN/PART to/from '%s' in filename '%s'.\n", tokens[2] + pos, filename);
// Build a friendly message (e.g. ":nick!user@host JOIN #channel" -> "nick (user@host) has joined #channel")
@@ -134,7 +134,7 @@ int logline(char *str, char *ournick, char *basedir, int type) {
snprintf(filename, MAXCHAR, "%s/logs/%s.log", basedir, tokens[2]);
- printf("logline(): Logging TOPIC for '%s' in filename '%s'.\n", tokens[2], filename);
+ debugprint("logline(): Logging TOPIC for '%s' in filename '%s'.\n", tokens[2], filename);
// Build a friendly message (e.g. ":nick!user@host TOPIC #channel :blah blah" -> "nick has changed the topic to: blah blah")
snprintf(line, MAXCHAR, "%s has changed the topic to: %s", tokens[0], str);
@@ -155,7 +155,7 @@ int logline(char *str, char *ournick, char *basedir, int type) {
printf("Error creating log directory '%s'.\n", logdir);
exit(1);
} else {
- printf("logline(): log directory '%s'.\n", logdir);
+ debugprint("logline(): log directory '%s'.\n", logdir);
}
}
@@ -200,7 +200,7 @@ int logline(char *str, char *ournick, char *basedir, int type) {
// Ensure the line finishes with CRLF
appendcrlf(line);
- printf("logline(): Complete log string to write: '%s', length '%ld'.\n", line, strlen(line));
+ debugprint("logline(): Complete log string to write: '%s', length '%ld'.\n", line, strlen(line));
// Write complete line to file
if ((bytes = fprintf(fp, line)) < 0) {