1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-12-04 14:46:46 -05:00
profanity/log.c

22 lines
325 B
C
Raw Normal View History

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