logo       

current errlog.c,1.62,1.63: msg#00052

web.privoxy.cvs

Subject: current errlog.c,1.62,1.63

Update of /cvsroot/ijbswa/current
In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv31726

Modified Files:
errlog.c
Log Message:
Stop overloading logfile to control the mingw32 log window as well.
It's no longer necessary now that we disable all debug lines by default
and at least one user perceived it as a regression (added in 1.55).


Index: errlog.c
===================================================================
RCS file: /cvsroot/ijbswa/current/errlog.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -d -r1.62 -r1.63
--- errlog.c 30 Nov 2007 15:33:46 -0000 1.62
+++ errlog.c 15 Dec 2007 19:49:32 -0000 1.63
@@ -33,6 +33,11 @@
*
* Revisions :
* $Log$
+ * Revision 1.63 2007/12/15 19:49:32 fabiankeil
+ * Stop overloading logfile to control the mingw32 log window as well.
+ * It's no longer necessary now that we disable all debug lines by default
+ * and at least one user perceived it as a regression (added in 1.55).
+ *
* Revision 1.62 2007/11/30 15:33:46 fabiankeil
* Unbreak LOG_LEVEL_FATAL. It wasn't fatal with logging disabled
* and on mingw32 fatal log messages didn't end up in the log file.
@@ -539,7 +544,8 @@
{
if (logfp != NULL)
{
- log_error(LOG_LEVEL_INFO, "No logfile configured. Logging disabled.");
+ log_error(LOG_LEVEL_INFO,
+ "No logfile configured. Please enable it before reporting any
problems.");
lock_logfile();
fclose(logfp);
logfp = NULL;
@@ -909,8 +915,11 @@
* settings and that logging is enabled.
* Bail out otherwise.
*/
- if ((loglevel != LOG_LEVEL_FATAL) &&
- ((0 == (loglevel & debug)) || (logfp == NULL)))
+ if ((0 == (loglevel & debug))
+#ifndef _WIN32
+ || (logfp == NULL)
+#endif
+ )
{
return;
}
@@ -1146,15 +1155,21 @@
loglevel = LOG_LEVEL_FATAL;
}

- assert(NULL != logfp || loglevel == LOG_LEVEL_FATAL);
+ assert(
+#ifndef _WIN32
+ (NULL != logfp) ||
+#endif
+ (loglevel & debug));

if (loglevel == LOG_LEVEL_FATAL)
{
fatal_error(outbuf_save);
/* Never get here */
}
- fputs(outbuf_save, logfp);
-
+ if (logfp != NULL)
+ {
+ fputs(outbuf_save, logfp);
+ }
unlock_logfile();

#if defined(_WIN32) && !defined(_WIN_CONSOLE)


-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise