1
0
Fork 0
profanity/log.c

22 lines
325 B
C
Raw Normal View History

2012-02-05 15:10:10 +00:00
#include <stdio.h>
#include "log.h"
extern FILE *logp;
2012-02-07 00:08:59 +00:00
void log_msg(const char * const area, const char * const msg)
2012-02-05 15:10:10 +00:00
{
2012-02-06 22:29:05 +00:00
fprintf(logp, "%s DEBUG: %s\n", area, msg);
2012-02-05 15:10:10 +00:00
}
2012-02-07 00:08:59 +00:00
void log_init(void)
2012-02-06 22:29:05 +00:00
{
logp = fopen("profanity.log", "a");
2012-02-07 00:08:59 +00:00
log_msg(PROF, "Starting Profanity...");
}
void log_close(void)
{
fclose(logp);
2012-02-06 22:29:05 +00:00
}