mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
Prevent logging of content into public log. Only log server events
This commit is contained in:
parent
d0e05bfc3f
commit
bacceb1a46
3 changed files with 9 additions and 13 deletions
|
@ -123,12 +123,12 @@ BOOL _serverLaunchTested = NO;
|
|||
- (void) processNotification: (NSNotification *)note
|
||||
{
|
||||
NSString *word = (NSString *)[note object];
|
||||
NSLog(@"Notified");
|
||||
NSDebugLog(@"Notified");
|
||||
if (_listensInForegroundOnly)
|
||||
{
|
||||
if (_appInForeground == NO)
|
||||
{
|
||||
NSLog(@"Only in foreground..");
|
||||
NSDebugLog(@"Only in foreground..");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -140,7 +140,7 @@ BOOL _serverLaunchTested = NO;
|
|||
if ([_speechRecognitionServer isBlocking: [_uuid UUIDString]] == NO)
|
||||
{
|
||||
// If we are not a blocking recognizer, then we are blocked...
|
||||
NSLog(@"Blocked...");
|
||||
NSDebugLog(@"Blocked...");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -172,12 +172,10 @@ BOOL _serverLaunchTested = NO;
|
|||
[name isEqualToString: NSApplicationDidFinishLaunchingNotification] ||
|
||||
[name isEqualToString: NSWindowDidBecomeKeyNotification])
|
||||
{
|
||||
NSLog(@"Foreground");
|
||||
_appInForeground = YES;
|
||||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Background");
|
||||
_appInForeground = NO;
|
||||
}
|
||||
}
|
||||
|
@ -316,7 +314,6 @@ BOOL _serverLaunchTested = NO;
|
|||
- (void) startListening
|
||||
{
|
||||
// Start listening to the notification being sent by the server....
|
||||
NSLog(@"Add notification");
|
||||
[[NSDistributedNotificationCenter defaultCenter]
|
||||
addObserver: self
|
||||
selector: @selector(processNotification:)
|
||||
|
@ -328,7 +325,6 @@ BOOL _serverLaunchTested = NO;
|
|||
- (void) stopListening
|
||||
{
|
||||
// Remove the observer for the notification....
|
||||
NSLog(@"Remove notification");
|
||||
[[NSDistributedNotificationCenter defaultCenter]
|
||||
removeObserver: self
|
||||
name: GSSpeechRecognizerDidRecognizeWordNotification
|
||||
|
|
|
@ -47,11 +47,11 @@ static int _clients = 0;
|
|||
|
||||
if(_clients == 0)
|
||||
{
|
||||
NSLog(@"Client count is zero, exiting");
|
||||
NSDebugLog(@"Client count is zero, exiting");
|
||||
exit(0);
|
||||
}
|
||||
|
||||
NSLog(@"NSSpeechRecognizer server connection count = %d after disconnection", _clients);
|
||||
NSDebugLog(@"NSSpeechRecognizer server connection count = %d after disconnection", _clients);
|
||||
while((o = [en nextObject]) != nil)
|
||||
{
|
||||
if ([o isKindOfClass: self])
|
||||
|
@ -87,7 +87,7 @@ static int _clients = 0;
|
|||
|
||||
+ (id)sharedServer
|
||||
{
|
||||
NSLog(@"NSSpeechRecognizer server connection count = %d after connection", _clients);
|
||||
NSDebugLog(@"NSSpeechRecognizer server connection count = %d after connection", _clients);
|
||||
return _sharedInstance;
|
||||
}
|
||||
|
||||
|
@ -111,7 +111,7 @@ static int _clients = 0;
|
|||
}
|
||||
else
|
||||
{
|
||||
NSLog(@"Got engine starting... %@", _engine);
|
||||
NSDebugLog(@"Got engine starting... %@", _engine);
|
||||
[_engine start];
|
||||
}
|
||||
|
||||
|
|
|
@ -168,7 +168,7 @@ static const arg_t cont_args_def[] = {
|
|||
if (in_speech && !utt_started)
|
||||
{
|
||||
utt_started = YES;
|
||||
NSLog(@"Listening...");
|
||||
NSDebugLog(@"Listening...");
|
||||
}
|
||||
|
||||
if (!in_speech && utt_started)
|
||||
|
@ -183,7 +183,7 @@ static const arg_t cont_args_def[] = {
|
|||
[self performSelectorOnMainThread: @selector(_recognizedWord:)
|
||||
withObject: recognizedString
|
||||
waitUntilDone: NO];
|
||||
NSLog(@"Word: %s", hyp);
|
||||
NSDebugLog(@"Word: %s", hyp);
|
||||
}
|
||||
|
||||
if (ps_start_utt(ps) < 0)
|
||||
|
|
Loading…
Reference in a new issue