1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-07-02 09:16:44 +02:00

don't share chatlogs across data files (changes log naming convention)

This commit is contained in:
Jfreegman
2014-09-22 17:09:39 -04:00
parent 3c74385f5c
commit 1c16467eb9
6 changed files with 74 additions and 48 deletions

View File

@ -30,14 +30,17 @@ struct chatlog {
bool log_on; /* specific to current chat window */
};
/* Creates/fetches log file by appending to the config dir the name and a pseudo-unique identity */
void init_logging_session(char *name, const char *key, struct chatlog *log);
enum {
LOG_GROUP,
LOG_PROMPT,
LOG_CHAT,
} LOG_TYPE;
/* formats/writes line to log file */
void write_to_log(const char *msg, const char *name, struct chatlog *log, bool event);
/* enables logging for specified log and creates/fetches file if necessary */
void log_enable(char *name, const char *key, struct chatlog *log);
void log_enable(char *name, const char *selfkey, const char *otherkey, struct chatlog *log, int logtype);
/* disables logging for specified log and closes file */
void log_disable(struct chatlog *log);