mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-21 02:41:11 +00:00
Add more informative -description
This commit is contained in:
parent
b34b6f2e3a
commit
2d5bf21478
1 changed files with 23 additions and 0 deletions
|
@ -206,6 +206,29 @@
|
|||
[super dealloc];
|
||||
}
|
||||
|
||||
- (NSString*) description
|
||||
{
|
||||
NSString *desc;
|
||||
|
||||
[_alarmLock lock];
|
||||
if (_isRunning)
|
||||
{
|
||||
desc = [NSString stringWithFormat: @"%@ host:%@ name:%@"
|
||||
@" queue:%u active:%u cleared:%u managed:%u",
|
||||
[super description], _host, _name, (unsigned)[_alarmQueue count],
|
||||
(unsigned)[_alarmsActive count],
|
||||
(unsigned)[_alarmsCleared count],
|
||||
(unsigned)[_managedObjects count]];
|
||||
}
|
||||
else
|
||||
{
|
||||
desc = [NSString stringWithFormat: @"%@ host:%@ name:%@ Not Running",
|
||||
[super description], _host, _name];
|
||||
}
|
||||
[_alarmLock unlock];
|
||||
return desc;
|
||||
}
|
||||
|
||||
- (id) initWithHost: (NSString*)host name: (NSString*)name
|
||||
{
|
||||
if (nil != (self = [super init]))
|
||||
|
|
Loading…
Reference in a new issue