Skip to content

Commit

Permalink
fix: logs directory
Browse files Browse the repository at this point in the history
  • Loading branch information
techmovie committed Mar 23, 2023
1 parent eef7eef commit 9f7ae5d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ COPY requirements.txt ./
COPY config_sample.py ./config.py
RUN pip install --no-cache-dir -r requirements.txt

ENV NOTION_API_KEY = 'your_notion_api_key'
ENV NOTION_DATABASE_ID = 'your_databse_id'
ENV TELEGRAM_BOT_TOKEN = 'your_telegram_bot_token'
ENV OPENAI_API_KEY = 'your_openai_api_key'
ENV OPENAI_PROMPT = 'your_openai_prompt'
ENV NOTION_API_KEY='your_notion_api_key'
ENV NOTION_DATABASE_ID='your_databse_id'
ENV TELEGRAM_BOT_TOKEN='your_telegram_bot_token'
ENV OPENAI_API_KEY='your_openai_api_key'
ENV OPENAI_PROMPT='your_openai_prompt'

COPY . .

Expand Down
5 changes: 4 additions & 1 deletion logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
import os

def setup_logger():
log_file_path = os.path.join('logs', 'bot.log')
logs_directory = 'logs'
if not os.path.exists(logs_directory):
os.makedirs(logs_directory)
log_file_path = os.path.join(logs_directory, 'bot.log')

logging.basicConfig(
level=logging.INFO,
Expand Down

0 comments on commit 9f7ae5d

Please sign in to comment.