Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
total_control_app
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Martin Drechsler
total_control_app
Commits
c1eb5747
Commit
c1eb5747
authored
May 22, 2019
by
Martin Drechsler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some logging added
parent
8729e0fd
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
2 deletions
+30
-2
cameraGui.py
cameraGui.py
+4
-1
cutelog_example.py
examples/cutelog_example.py
+8
-1
main.py
main.py
+18
-0
No files found.
cameraGui.py
View file @
c1eb5747
...
...
@@ -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'
))
...
...
examples/cutelog_example.py
View file @
c1eb5747
...
...
@@ -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
main.py
View file @
c1eb5747
...
...
@@ -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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment