quick_frontend: use of new logging system
This commit is contained in:
parent
233d4b4268
commit
468206e529
1 changed files with 62 additions and 58 deletions
|
|
@ -18,9 +18,9 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from sat.core.i18n import _
|
||||
from logging import debug, info, warning, error
|
||||
from sat.core.log import getLogger
|
||||
log = getLogger(__name__)
|
||||
from sat.tools.jid import JID
|
||||
import pdb
|
||||
|
||||
|
||||
class QuickContactManagement(object):
|
||||
|
|
@ -68,7 +68,7 @@ class QuickContactManagement(object):
|
|||
if self.__contactlist[entity.bare].has_key(name):
|
||||
return self.__contactlist[entity.bare][name]
|
||||
else:
|
||||
debug(_('Trying to get attribute for an unknown contact'))
|
||||
log.debug(_('Trying to get attribute for an unknown contact'))
|
||||
return None
|
||||
|
||||
def isConnected(self, entity):
|
||||
|
|
@ -84,7 +84,7 @@ class QuickContactManagement(object):
|
|||
#no more resource available: the contact seems really disconnected
|
||||
del self.__contactlist[entity.bare]
|
||||
except KeyError:
|
||||
error(_('INTERNAL ERROR: Key error'))
|
||||
log.error(_('INTERNAL ERROR: Key log.error'))
|
||||
raise
|
||||
|
||||
def update(self, entity, key, value):
|
||||
|
|
@ -96,7 +96,7 @@ class QuickContactManagement(object):
|
|||
if self.__contactlist.has_key(entity.bare):
|
||||
self.__contactlist[entity.bare][key] = value
|
||||
else:
|
||||
debug (_('Trying to update an unknown contact: %s'), entity.bare)
|
||||
log.debug (_('Trying to update an unknown contact: %s') % entity.bare)
|
||||
|
||||
def get_full(self, entity):
|
||||
return entity.bare+'/'+self.__contactlist[entity.bare]['resources'][-1]
|
||||
|
|
|
|||
Loading…
Reference in a new issue