Mercurial > ~mikael > mcabber > hg
diff mcabber/src/settings.c @ 374:bd5638c21834
Improve logging system (traces)
There are now two trace logging levels:
* tracelog_level = 1:
Most messages from the log window are written to disk (LPRINT_LOG)
* tracelog_level =2:
LPRINT_LOG & LPRINT_DEBUG messages are written to disk
The trace file name is set with the "tracelog_file" option.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Mon, 25 Jul 2005 21:46:35 +0100 |
parents | 33b8e801ffa6 |
children | 2e6c7b1440d1 |
line wrap: on
line diff
--- a/mcabber/src/settings.c Mon Jul 25 19:40:17 2005 +0100 +++ b/mcabber/src/settings.c Mon Jul 25 21:46:35 2005 +0100 @@ -78,7 +78,7 @@ // Use default config file locations char *home = getenv("HOME"); if (!home) { - ut_WriteLog("Can't find home dir!\n"); + scr_LogPrint(LPRINT_LOG, "Can't find home dir!"); fprintf(stderr, "Can't find home dir!\n"); return -1; } @@ -138,14 +138,16 @@ if (strncmp(line, "set ", 4) && strncmp(line, "bind ", 5) && strncmp(line, "alias ", 6)) { - scr_LogPrint("Error in configuration file (l. %d): bad command", ln); + scr_LogPrint(LPRINT_LOGNORM, + "Error in configuration file (l. %d): bad command", ln); err++; continue; } *(--line) = '/'; // Set the leading '/' to build a command line process_command(line); // Process the command } else { - scr_LogPrint("Error in configuration file (l. %d): no assignment", ln); + scr_LogPrint(LPRINT_LOGNORM, + "Error in configuration file (l. %d): no assignment", ln); err++; } }