mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-19 18:11:26 +00:00
add test logging methods
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@36379 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
80bd3b6a7b
commit
8d65d2eb37
3 changed files with 37 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2013-03-18 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* EcProcess.h:
|
||||||
|
* EcProcess.m:
|
||||||
|
Add test logging methods ([-ecTestLog:...])
|
||||||
|
|
||||||
2013-03-15 Richard Frith-Macdonald <rfm@gnu.org>
|
2013-03-15 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
* EcProcess.h: Document EcCoreSize
|
* EcProcess.h: Document EcCoreSize
|
||||||
|
|
10
EcProcess.h
10
EcProcess.h
|
@ -846,6 +846,16 @@ extern NSString* cmdVersion(NSString *ver);
|
||||||
*/
|
*/
|
||||||
- (int) ecRun;
|
- (int) ecRun;
|
||||||
|
|
||||||
|
/** Logs a message iff the process is running in test mode
|
||||||
|
* (that is, when EcTesting is set).
|
||||||
|
*/
|
||||||
|
- (void) ecTestLog: (NSString*)fmt arguments: (va_list)args;
|
||||||
|
|
||||||
|
/** Logs a message iff the process is running in test mode.<br />
|
||||||
|
* Operates by calling the -ecTestLog:arguments: method.
|
||||||
|
*/
|
||||||
|
- (void) ecTestLog: (NSString*)fmt, ...;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
@interface NSObject (RemoteServerDelegate)
|
@interface NSObject (RemoteServerDelegate)
|
||||||
|
|
22
EcProcess.m
22
EcProcess.m
|
@ -2008,7 +2008,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
[c setDelegate: self];
|
[c setDelegate: self];
|
||||||
[[NSNotificationCenter defaultCenter]
|
[[NSNotificationCenter defaultCenter]
|
||||||
addObserver: self
|
addObserver: self
|
||||||
selector: @selector(connectionBecameInvalid:)
|
selector: @selector(cmdConnectionBecameInvalid:)
|
||||||
name: NSConnectionDidDieNotification
|
name: NSConnectionDidDieNotification
|
||||||
object: c];
|
object: c];
|
||||||
EcProcConnection = c;
|
EcProcConnection = c;
|
||||||
|
@ -2051,6 +2051,26 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
- (void) ecTestLog: (NSString*)fmt arguments: (va_list)args
|
||||||
|
{
|
||||||
|
if (YES == cmdFlagTesting)
|
||||||
|
{
|
||||||
|
NSLogv(fmt, args);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void) ecTestLog: (NSString*)fmt, ...
|
||||||
|
{
|
||||||
|
if (YES == cmdFlagTesting)
|
||||||
|
{
|
||||||
|
va_list ap;
|
||||||
|
|
||||||
|
va_start (ap, fmt);
|
||||||
|
[self ecTestLog: fmt arguments: ap];
|
||||||
|
va_end (ap);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
- (void) setCmdDebug: (NSString*)mode withDescription: (NSString*)desc
|
- (void) setCmdDebug: (NSString*)mode withDescription: (NSString*)desc
|
||||||
{
|
{
|
||||||
[cmdDebugKnown setObject: desc forKey: mode];
|
[cmdDebugKnown setObject: desc forKey: mode];
|
||||||
|
|
Loading…
Reference in a new issue