mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 09:04:13 +00:00
Fix logging bug in gdnd and add lots of double ckecking of logs.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27676 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
456b2a7d49
commit
beae2e1e2a
3 changed files with 218 additions and 154 deletions
|
@ -1,6 +1,9 @@
|
|||
2009-01-25 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSString.m: Fix for bug #25400
|
||||
* Tools/gdnc.m: Fix failure to log exception (bug #25396)
|
||||
* Tools/gdomap.c: Use snprintf for paranoid double check
|
||||
of data in log buffer.
|
||||
|
||||
2009-01-23 Riccardo Mottola <rmottola@users.sf.net>
|
||||
|
||||
|
|
|
@ -42,14 +42,13 @@
|
|||
static BOOL debugging = NO;
|
||||
static BOOL is_daemon = NO; /* Currently running as daemon. */
|
||||
static BOOL auto_stop = NO; /* Should we shut down when unused? */
|
||||
static char ebuf[2048];
|
||||
|
||||
#ifdef HAVE_SYSLOG
|
||||
|
||||
static int log_priority = LOG_DEBUG;
|
||||
|
||||
static void
|
||||
gdnc_log (int prio)
|
||||
gdnc_log (int prio, const char *ebuf)
|
||||
{
|
||||
if (is_daemon)
|
||||
{
|
||||
|
@ -87,8 +86,8 @@ gdnc_log (int prio)
|
|||
#define LOG_ERR 1
|
||||
#define LOG_INFO 0
|
||||
#define LOG_WARNING 0
|
||||
void
|
||||
gdnc_log (int prio)
|
||||
static void
|
||||
gdnc_log (int prio, const char *ebuf)
|
||||
{
|
||||
write (2, ebuf, strlen (ebuf));
|
||||
write (2, "\n", 1);
|
||||
|
@ -1121,7 +1120,7 @@ main(int argc, char** argv, char** env)
|
|||
}
|
||||
NS_HANDLER
|
||||
{
|
||||
gdnc_log(LOG_CRIT);
|
||||
gdnc_log(LOG_CRIT, [[localException description] UTF8String]);
|
||||
DESTROY(t);
|
||||
}
|
||||
NS_ENDHANDLER
|
||||
|
|
360
Tools/gdomap.c
360
Tools/gdomap.c
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue