From 42c502039594268ba045919654d4fb725ed563ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cyrill=20K=C3=BCttel?= Date: Thu, 11 Jul 2024 01:11:55 +0200 Subject: [PATCH] Add logging --- src/privatim/file/setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/privatim/file/setup.py b/src/privatim/file/setup.py index ef1aa99..8be677b 100644 --- a/src/privatim/file/setup.py +++ b/src/privatim/file/setup.py @@ -1,18 +1,23 @@ """ Setup static file storage. """ +import logging from pathlib import Path from typing import Any from libcloud.storage.drivers.local import LocalStorageDriver from sqlalchemy_file.storage import StorageManager +log = logging.getLogger(__name__) + def setup_filestorage(settings: Any) -> None: """ Configure storage of static assets """ documents_dir = Path(settings.get('documents_dir', 'uploads')) + log.error(f'documents_dir: {documents_dir}') + asset_dir = documents_dir / 'assets' asset_dir.mkdir(exist_ok=True, parents=True)