aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/vk
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-06-16 17:51:12 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-06-16 17:51:12 +0300
commit9d586534e75237531a65cac782e2a2fdbcc87118 (patch)
treed9ae3566bd82bbeff13f31d5c4e159486d610361 /vk
parentadd CSV database reader (diff)
downloadvk-scripts-9d586534e75237531a65cac782e2a2fdbcc87118.tar.gz
vk-scripts-9d586534e75237531a65cac782e2a2fdbcc87118.zip
log user's "last seen" time if they're online
Diffstat (limited to 'vk')
-rw-r--r--vk/utils/tracking/logger.py5
1 files changed, 3 insertions, 2 deletions
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):