Commit c1eb5747 authored by Martin Drechsler's avatar Martin Drechsler

some logging added

parent 8729e0fd
......@@ -21,6 +21,9 @@ from measurement import MeasurementFrame
import sys
import numpy as np
import logging
LOG = logging.getLogger('Main logger')
GUI_LOG = LOG.getChild('GUI logger')
class CameraGuiMainWindow(QMainWindow):
......@@ -38,7 +41,7 @@ class CameraGuiMainWindow(QMainWindow):
self.initUI()
def initUI(self):
GUI_LOG.info('Initializing gui')
self.win = QtGui.QMainWindow()
self.win.setWindowTitle("Camera GUI")
self.win.setWindowIcon(QtGui.QIcon('Butter_robot.png'))
......
......@@ -9,9 +9,11 @@ Created on Tue May 21 20:08:33 2019
import logging
from logging.handlers import SocketHandler
log = logging.getLogger('Root logger')
log = logging.getLogger('Main logger')
gui_log = log.getChild("GUI logger")
worker_log = log.getChild("Worker logger")
acq_log = log.getChild("Acquisition logger")
log.setLevel(1) # to send all records to cutelog
socket_handler = SocketHandler('127.0.0.1', 19996) # default listening address
......@@ -19,3 +21,8 @@ log.addHandler(socket_handler)
log.info('Hello world!')
gui_log.info('hello')
worker_log.info('hello')
acq_log.info('hello')
for i in range(5):
gui_log.debug('%i is the number'% (i) )
worker_log.info('{} sent to {}'.format(i, 'daq'))
\ No newline at end of file
......@@ -10,7 +10,25 @@ from MCDAQcontrolsignals import digital_control_signal
from controlGui import ControlGui
import logging
from logging.handlers import SocketHandler
if __name__ == "__main__":
log = logging.getLogger('Main logger')
gui_log = log.getChild("GUI logger")
worker_log = log.getChild("Worker logger")
acq_log = log.getChild("Acquisition logger")
log.setLevel(1) # to send all records to cutelog
socket_handler = SocketHandler('127.0.0.1', 19996) # default listening address
log.addHandler(socket_handler)
log.info('Hello world!')
gui_log.info('hello')
worker_log.info('hello')
acq_log.info('hello')
import sys
app = QtGui.QApplication([])
app_icon = QtGui.QIcon()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment