8000 Add timestamps to logfile messages by vapniks · Pull Request #256 · matlink/gplaycli · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add timestamps to logfile messages #256

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions gplaycli/gplaycli.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import argparse
import requests
import configparser
from datetime import datetime

from gpapi.googleplay import GooglePlayAPI, LoginError, RequestError
from google.protobuf.message import DecodeError
Expand Down Expand Up @@ -594,9 +595,9 @@ def write_logfiles(self, success, failed, unavail):
for result, logfile in [(success, self.success_logfile), (failed, self.failed_logfile), (unavail, self.unavail_logfile)]:
if not result:
continue
with open(logfile, 'w') as _buffer:
with open(logfile, 'a') as _buffer:
for package in result:
print(package, file=_buffer)
print(str(datetime.now()) + " : " + package, file=_buffer)

########## End internal methods ##########

Expand Down
0