gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

debugSet


From: Manuel Guesdon
Subject: debugSet
Date: Wed, 25 Jun 2003 20:08:47 +0200 (CEST)

Hi,

Is it possible to add a method in NSProcessInfo to assign debugSet ?
It's allow to disable dynamically disable completely debug logs (with the 
possibility to re enabled them later) and it
will save process time.

Following  is a quick & dirty patch for this.


Or may be a better solution: having a flag to disable/enable debug logs.


Manuel


RCS file: /cvsroot/gnustep/gnustep/core/base/Source/NSProcessInfo.m,v
retrieving revision 1.88
diff -u -r1.88 NSProcessInfo.m
--- Source/NSProcessInfo.m        29 Dec 2002 02:00:04 -0000        1.88
+++ Source/NSProcessInfo.m        25 Jun 2003 18:00:16 -0000
@@ -808,6 +808,11 @@
   return _debug_set;
 }
 
+- (void) setDebugSet:(NSMutableSet*)debugSet
+{
+  ASSIGN(_debug_set,debugSet);
+}
+
 /**
  * Set the file to which NSLog output should be directed.<br />
  * Returns YES on success, NO on failure.<br />
@@ -840,7 +845,8 @@
 {
   static IMP debugImp = 0;
   static SEL debugSel;
-
+  if (_debug_set)
+    {
   if (debugImp == 0)
     {
       debugSel = @selector(member:);
@@ -855,6 +861,9 @@
       return NO;
     }
   return YES;
+    }
+  else
+    return NO;
 }
 
 

--
______________________________________________________________________
Manuel Guesdon - OXYMIUM <address@hidden>
14 rue Jean-Baptiste Clement  -  93200 Saint-Denis  -  France
Tel: +33 1 4940 0999  -  Fax: +33 1 4940 0998





reply via email to

[Prev in Thread] Current Thread [Next in Thread]