Commit 2fb2c535 authored by markus's avatar markus

Change file logger format

parent eaefdc5f
......@@ -7,7 +7,7 @@ from time import sleep
import datetime
import logging
logging.basicConfig(filename='collector.log', level=logging.INFO)
logging.basicConfig(filename='collector.log', format='%(asctime)s - %(name)s:%(levelname)s: %(message)s', level=logging.INFO)
logger = logging.getLogger(__name__)
import urllib.request
......
......@@ -20,7 +20,7 @@ class TwitterClient:
def handle_observation(self, observation, observation_data, waterfall_image, data_images, tweet_waterfall = False):
with tempfile.TemporaryFile() as tmp:
tmp.write(data_images[0])
text = f"New satellite image from {observation_data['satellite_name']} at {observation_data['data_timeframe_start']} UTC. {observation_data['url']} #cccamp19"
text = f"New satellite image from {observation_data['satellite_name']} at {observation_data['data_timeframe_start']} UTC. {observation_data['url']} #cccamp19"
try:
status = self.api.update_with_media("image.png", text, file=tmp)
except tweepy.error.TweepError as e:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment