Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Maxime Buquet
poezio
Commits
e5f219d4
Commit
e5f219d4
authored
Apr 06, 2013
by
mathieui
Browse files
Do not attempt to log things when use_log = false
parent
91b960b7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/logger.py
View file @
e5f219d4
...
...
@@ -104,6 +104,8 @@ class Logger(object):
"""
log the message in the appropriate jid's file
"""
if
config
.
get_by_tabname
(
'use_log'
,
'false'
,
jid
)
!=
'true'
:
return
True
if
jid
in
self
.
fds
.
keys
():
fd
=
self
.
fds
[
jid
]
else
:
...
...
@@ -130,6 +132,11 @@ class Logger(object):
return
True
def
log_roster_change
(
self
,
jid
,
message
):
"""
Log a roster change
"""
if
config
.
get_by_tabname
(
'use_log'
,
'false'
,
jid
)
!=
'true'
:
return
True
if
not
self
.
roster_logfile
:
try
:
self
.
roster_logfile
=
open
(
os
.
path
.
join
(
DATA_HOME
,
'logs'
,
'roster.log'
),
'a'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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