1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-10-06 20:03:46 -04:00
profanity/log.c
2012-02-12 22:10:30 +00:00

22 lines
325 B
C

#include <stdio.h>
#include "log.h"
extern FILE *logp;
void log_msg(const char * const area, const char * const msg)
{
fprintf(logp, "%s DEBUG: %s\n", area, msg);
}
void log_init(void)
{
logp = fopen("profanity.log", "a");
log_msg(PROF, "Starting Profanity...");
}
void log_close(void)
{
fclose(logp);
}