From 9d586534e75237531a65cac782e2a2fdbcc87118 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 16 Jun 2016 17:51:12 +0300 Subject: log user's "last seen" time if they're online --- vk/utils/tracking/logger.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'vk/utils') diff --git a/vk/utils/tracking/logger.py b/vk/utils/tracking/logger.py index 075935f..795f799 100644 --- a/vk/utils/tracking/logger.py +++ b/vk/utils/tracking/logger.py @@ -19,7 +19,7 @@ class Logger: logging.info(Logger._format_user_is_online(user)) else: logging.info(Logger._format_user_is_offline(user)) - logging.info(Logger._format_user_last_seen(user)) + logging.info(Logger._format_user_last_seen(user)) @staticmethod def on_status_update(user): @@ -27,6 +27,7 @@ class Logger: logging.info(Logger._format_user_went_online(user)) else: logging.info(Logger._format_user_went_offline(user)) + logging.info(Logger._format_user_last_seen(user)) @staticmethod def on_exception(e): @@ -49,7 +50,7 @@ class Logger: @staticmethod def _format_user_last_seen(user): - return '{} was last seen at {}'.format(Logger._format_user(user), user.get_last_seen()) + return '{} was last seen at {}'.format(Logger._format_user(user), user.get_last_seen_local()) @staticmethod def _format_user_went_online(user): -- cgit v1.2.3