summaryrefslogtreecommitdiff
path: root/voctocore/lib
diff options
context:
space:
mode:
authorMaZderMind <github@mazdermind.de>2015-05-14 17:30:11 +0200
committerMaZderMind <github@mazdermind.de>2015-05-14 17:30:11 +0200
commitfbd6d801ed08d560e050c48048e419be6fd35e3a (patch)
tree0f58d5cf531e8c138082d71da5c313d1e3b908bf /voctocore/lib
parent66d7b53682f87541dcd0970bd76bcb3b677977fb (diff)
Improve/Repair Logging
Diffstat (limited to 'voctocore/lib')
-rw-r--r--voctocore/lib/args.py2
-rw-r--r--voctocore/lib/avrawoutput.py3
-rw-r--r--voctocore/lib/avsource.py9
3 files changed, 8 insertions, 6 deletions
diff --git a/voctocore/lib/args.py b/voctocore/lib/args.py
index 3f1f3df..1e416f8 100644
--- a/voctocore/lib/args.py
+++ b/voctocore/lib/args.py
@@ -3,7 +3,7 @@ import argparse
__all__ = ['Args']
parser = argparse.ArgumentParser(description='Voctocore')
-parser.add_argument('-v', '--verbose', action='store_true',
+parser.add_argument('-v', '--verbose', action='count',
help="Also print INFO and DEBUG messages.")
parser.add_argument('-c', '--color', action='store', choices=['auto', 'always', 'never'], default='auto',
diff --git a/voctocore/lib/avrawoutput.py b/voctocore/lib/avrawoutput.py
index fd16e58..630c2ca 100644
--- a/voctocore/lib/avrawoutput.py
+++ b/voctocore/lib/avrawoutput.py
@@ -71,7 +71,8 @@ class AVRawOutput(object):
self.log.debug('fd %u removed from multifdsink', fileno)
self.currentConnections.remove(conn)
- self.log.info('Disconnected Receiver %s, now %u Receiver connected', addr, len(self.currentConnections))
+ self.log.info('Disconnected Receiver %s', addr)
+ self.log.info('Now %u Receiver connected', len(self.currentConnections))
self.log.debug('Adding fd %u to multifdsink', conn.fileno())
fdsink = self.receiverPipeline.get_by_name('fd')
diff --git a/voctocore/lib/avsource.py b/voctocore/lib/avsource.py
index ff36470..49b39a8 100644
--- a/voctocore/lib/avsource.py
+++ b/voctocore/lib/avsource.py
@@ -81,19 +81,20 @@ class AVSource(object):
return True
def on_eos(self, bus, message):
- self.log.info('Received End-of-Stream-Signal on Source-Pipeline')
+ self.log.debug('Received End-of-Stream-Signal on Source-Pipeline')
if self.currentConnection is not None:
self.disconnect()
def on_error(self, bus, message):
- self.log.info('Received Error-Signal on Source-Pipeline')
- (code, debug) = message.parse_error()
- self.log.debug('Error-Details: #%u: %s', code, debug)
+ self.log.debug('Received Error-Signal on Source-Pipeline')
+ (error, debug) = message.parse_error()
+ self.log.debug('Error-Details: #%u: %s', error.code, debug)
if self.currentConnection is not None:
self.disconnect()
def disconnect(self):
+ self.log.info('Connection closed')
self.receiverPipeline.set_state(Gst.State.NULL)
self.receiverPipeline = None
self.currentConnection = None