mirror of
https://github.com/profanity-im/profanity.git
synced 2024-09-01 19:24:15 -04:00
22 lines
325 B
C
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);
|
|
}
|