diff options
author | James Booth <boothj5@gmail.com> | 2012-02-05 15:22:02 +0000 |
---|---|---|
committer | James Booth <boothj5@gmail.com> | 2012-02-05 15:22:02 +0000 |
commit | 39627be1f5efd07febdc6ee545f2e8c5b2603f8d (patch) | |
tree | a84ab40e0b8fa87bb5dcc7633f9b9a843eecbf2c /profanity.c | |
parent | 5eaf687d98de9683ea4e479845868c56c14f015d (diff) | |
download | profani-tty-39627be1f5efd07febdc6ee545f2e8c5b2603f8d.tar.gz |
Tidied up logging functions
Diffstat (limited to 'profanity.c')
-rw-r--r-- | profanity.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/profanity.c b/profanity.c index cbc6aefc..98331039 100644 --- a/profanity.c +++ b/profanity.c @@ -9,6 +9,9 @@ // refernce to log extern FILE *logp; +// area for log message in profanity +static const char *prof = "prof"; + // chat windows static WINDOW *incoming_border; static WINDOW *outgoing_border; @@ -49,7 +52,7 @@ int main(void) xmpp_log_t *log; logp = fopen("profanity.log", "a"); - fprintf(logp, "Starting Profanity...\n"); + logmsg(prof, "Starting Profanity..."); init(); print_title(); @@ -64,7 +67,10 @@ int main(void) getstr(passwd); echo(); - fprintf(logp, "Log in, user = %s\n", user); + char loginmsg[100]; + sprintf(loginmsg, "User <%s> logged in", user); + logmsg(prof, loginmsg); + //fprintf(logp, "Log in, user = %s\n", user); xmpp_initialize(); |