Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Kulya
vmj-qt
Commits
e9f38489
Commit
e9f38489
authored
Oct 19, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed superfluous code protection
parent
8de1c4e6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
13 deletions
+4
-13
logging.py
blink/logging.py
+4
-13
No files found.
blink/logging.py
View file @
e9f38489
...
@@ -2,8 +2,6 @@
...
@@ -2,8 +2,6 @@
# This module will be replaced by an improved logging system. -Luci
# This module will be replaced by an improved logging system. -Luci
#
#
from
__future__
import
with_statement
__all__
=
[
'LogManager'
]
__all__
=
[
'LogManager'
]
import
os
import
os
...
@@ -11,7 +9,6 @@ import sys
...
@@ -11,7 +9,6 @@ import sys
from
datetime
import
datetime
from
datetime
import
datetime
from
pprint
import
pformat
from
pprint
import
pformat
from
threading
import
RLock
from
application
import
log
from
application
import
log
from
application.notification
import
IObserver
,
NotificationCenter
from
application.notification
import
IObserver
,
NotificationCenter
...
@@ -76,7 +73,6 @@ class LogManager(object):
...
@@ -76,7 +73,6 @@ class LogManager(object):
self
.
pjsiptrace_file
=
Null
self
.
pjsiptrace_file
=
Null
self
.
notifications_file
=
Null
self
.
notifications_file
=
Null
self
.
event_queue
=
Null
self
.
event_queue
=
Null
self
.
_lock
=
Null
self
.
_siptrace_start_time
=
None
self
.
_siptrace_start_time
=
None
self
.
_siptrace_packet_count
=
None
self
.
_siptrace_packet_count
=
None
...
@@ -92,7 +88,6 @@ class LogManager(object):
...
@@ -92,7 +88,6 @@ class LogManager(object):
self
.
pjsiptrace_file
=
LogFile
(
os
.
path
.
join
(
ApplicationData
.
directory
,
'logs'
,
'pjsip_trace.txt'
))
self
.
pjsiptrace_file
=
LogFile
(
os
.
path
.
join
(
ApplicationData
.
directory
,
'logs'
,
'pjsip_trace.txt'
))
if
settings
.
logs
.
trace_notifications
:
if
settings
.
logs
.
trace_notifications
:
self
.
notifications_file
=
LogFile
(
os
.
path
.
join
(
ApplicationData
.
directory
,
'logs'
,
'notifications_trace.txt'
))
self
.
notifications_file
=
LogFile
(
os
.
path
.
join
(
ApplicationData
.
directory
,
'logs'
,
'notifications_trace.txt'
))
self
.
_lock
=
RLock
()
self
.
_siptrace_start_time
=
datetime
.
now
()
self
.
_siptrace_start_time
=
datetime
.
now
()
self
.
_siptrace_packet_count
=
0
self
.
_siptrace_packet_count
=
0
self
.
event_queue
=
EventQueue
(
handler
=
self
.
_process_notification
,
name
=
'Log handling'
)
self
.
event_queue
=
EventQueue
(
handler
=
self
.
_process_notification
,
name
=
'Log handling'
)
...
@@ -102,12 +97,9 @@ class LogManager(object):
...
@@ -102,12 +97,9 @@ class LogManager(object):
notification_center
=
NotificationCenter
()
notification_center
=
NotificationCenter
()
notification_center
.
remove_observer
(
self
)
notification_center
.
remove_observer
(
self
)
with
self
.
_lock
:
self
.
event_queue
.
stop
()
event_queue
=
self
.
event_queue
self
.
event_queue
.
join
()
self
.
event_queue
=
Null
self
.
event_queue
=
Null
event_queue
.
stop
()
self
.
_lock
=
Null
event_queue
.
join
()
self
.
siptrace_file
=
Null
self
.
siptrace_file
=
Null
self
.
msrptrace_file
=
Null
self
.
msrptrace_file
=
Null
...
@@ -115,7 +107,6 @@ class LogManager(object):
...
@@ -115,7 +107,6 @@ class LogManager(object):
self
.
notifications_file
=
Null
self
.
notifications_file
=
Null
def
handle_notification
(
self
,
notification
):
def
handle_notification
(
self
,
notification
):
with
self
.
_lock
:
self
.
event_queue
.
put
(
notification
)
self
.
event_queue
.
put
(
notification
)
def
_process_notification
(
self
,
notification
):
def
_process_notification
(
self
,
notification
):
...
...
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