runtime/loglevels.py
author Edouard Tisserant
Thu, 19 Apr 2018 12:22:40 +0200
changeset 1994 1fdc32be71b8
parent 1973 cc7a46953471
permissions -rw-r--r--
Rework of runtime non-real-time threading, and shared object dynamic loading :
- All exposed operations on PLCObject are now serialized through main thread
(@RunInMain). Only one exception : python trace thread calling _GetDebugData
- Re-loading of same shared object is prevented. dlclose/delte/rewrite/dlopen
don't happen in that case. This is a workaround for some xenomai copperplate
bug triggering segfault, inbetween delete and rewrite.
- Trace thread now waits for data, dies if no data, and dies instead of
suspending as before when no data consumed after 3 seconds.
- Disabled threading in Pyro client
- Enforced auxiliary threads starting sequence : Pyro -> [UI] ->
PLCWorker.RunLoop
592
c6408f92da0a Initial TIME support in debugger
Edouard Tisserant
parents:
diff changeset
     1
#!/usr/bin/env python
c6408f92da0a Initial TIME support in debugger
Edouard Tisserant
parents:
diff changeset
     2
# -*- coding: utf-8 -*-
1571
486f94a8032c fix license notices in source files and license files under GPLv2+
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1433
diff changeset
     3
1667
cefc9219bb48 runtime is licensed under LGPLv2.1
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1571
diff changeset
     4
# See COPYING.Runtime file for copyrights details.
1075
8078c01ae464 Now Debug Buffer Unpacking is a separate function, declared in typemapping.py
Edouard Tisserant
parents: 972
diff changeset
     5
1740
b789b695b5c6 clean-up: fix PEP8 E231 missing whitespace after ':' or ','
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1739
diff changeset
     6
LogLevels = ["CRITICAL", "WARNING", "INFO", "DEBUG"]
917
401e44bae7c0 Now logging have 4 levels
Edouard Tisserant
parents: 595
diff changeset
     7
LogLevelsCount = len(LogLevels)
1740
b789b695b5c6 clean-up: fix PEP8 E231 missing whitespace after ':' or ','
Andrey Skvortsov <andrej.skvortzov@gmail.com>
parents: 1739
diff changeset
     8
LogLevelsDict = dict(zip(LogLevels, range(LogLevelsCount)))
917
401e44bae7c0 Now logging have 4 levels
Edouard Tisserant
parents: 595
diff changeset
     9
LogLevelsDefault = LogLevelsDict["DEBUG"]