Skip to content

Commit 6b7eb9b

Browse files
authored
chore: update logging for the CSV export function (#1211)
1 parent a857ca7 commit 6b7eb9b

File tree

1 file changed

+2
-3
lines changed
  • functions-python/export_csv/src

1 file changed

+2
-3
lines changed

functions-python/export_csv/src/main.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
from geoalchemy2.shape import to_shape
3030

3131
from shared.database.database import with_db_session
32-
from shared.helpers.logger import Logger
32+
from shared.helpers.logger import init_logger
3333
from shared.database_gen.sqlacodegen_models import Gtfsfeed, Gtfsrealtimefeed, Feed
3434
from shared.common.db_utils import (
3535
get_all_gtfs_rt_feeds,
@@ -41,7 +41,7 @@
4141

4242
load_dotenv()
4343
csv_default_file_path = "./output.csv"
44-
44+
init_logger()
4545
# This needs to be updated if we add fields to either `get_feed_csv_data` or
4646
# `get_gtfs_rt_feed_csv_data`, otherwise the extra field(s) will be excluded from
4747
# the generated CSV file.
@@ -114,7 +114,6 @@ def export_and_upload_csv(_):
114114
FEEDS_DATABASE_URL: database URL
115115
:return: HTTP response object
116116
"""
117-
Logger.init_logger()
118117
logging.info("Export started")
119118

120119
csv_file_path = csv_default_file_path

0 commit comments

Comments
 (0)