Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
neoppod
Commits
17fc0ef9
Commit
17fc0ef9
authored
Oct 27, 2014
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
logger: new _setup() method to setup the logger when lock is already acquired
This commit only moves code from setup() to _setup()
parent
88c0d6f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
51 deletions
+54
-51
neo/lib/logger.py
neo/lib/logger.py
+54
-51
No files found.
neo/lib/logger.py
View file @
17fc0ef9
...
...
@@ -135,8 +135,7 @@ class NEOLogger(Logger):
while
max_size
<
self
.
_record_size
:
self
.
_record_size
-=
RECORD_SIZE
+
len
(
q
.
popleft
().
msg
)
def
setup
(
self
,
filename
=
None
,
reset
=
False
):
with
self
:
def
_setup
(
self
,
filename
=
None
,
reset
=
False
):
from
.
import
protocol
as
p
global
uuid_str
uuid_str
=
p
.
uuid_str
...
...
@@ -188,6 +187,10 @@ class NEOLogger(Logger):
else
:
with
self
.
_db
:
q
(
"INSERT INTO protocol VALUES (?,?)"
,
(
time
(),
p
))
def
setup
(
self
,
filename
=
None
,
reset
=
False
):
with
self
:
self
.
_setup
(
filename
,
reset
)
__del__
=
setup
def
isEnabledFor
(
self
,
level
):
...
...
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