Crossfire Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Server crash in /city/anthony/prison



On Thu, Jun 15, 2000 at 05:04:09PM +0200, Neil Muller wrote:
> so the log messages are somewhat less complete than I would like.) Probably 
> the logging messages should be wrapped in an if (debug) statement, but 
> I've not done so. 

Use the LOG function for logging messages.

> +			   fprintf(stderr, "Msgnr %d, after keyword %s\n",msgnr+1,msgs->keywords[msgnr][keywordnr-2]);

  LOG (llevError, "Msgnr %d, after keyword %s\n", msgnr + 1,
       msgs->keywords[msgnr][keywordnr-2]);

With llevDebug instead of llevError, you would get the effect of
wrapping the log message in an if (debug) statement.  But I prefer all
indications of errors to be logged with llevError, because this allows
me to trap all errors immediately after they are detected with a simple
"break LOG if logLevel == llevError" in gdb, provided that I run the
server "interactively" from gdb.

-- 
Jan