Skip to content

Commit

Permalink
use print instead of logger and use info as default level in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-hub committed Oct 16, 2024
1 parent d652ce1 commit 2520572
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion infra/scripts/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ python manage.py makemigrations --noinput
python manage.py migrate --noinput
python manage.py init_user_organization

gunicorn --env DJANGO_SETTINGS_MODULE=promptsmith.settings_production promptsmith.wsgi:application --bind 0.0.0.0:8000 --workers 2 --log-level=debug
gunicorn --env DJANGO_SETTINGS_MODULE=promptsmith.settings_production promptsmith.wsgi:application --bind 0.0.0.0:8000 --workers 2 --log-level=info
8 changes: 4 additions & 4 deletions promptsmith/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
FRONTEND_DOMAIN = os.getenv('FRONTEND_DOMAIN', 'localhost')

logging.info("load settings")
logging.info("DEBUG: {}".format(DEBUG))
logging.info("RUNNING_DEVELOPMENT_SERVER: {}".format(RUNNING_DEVELOPMENT_SERVER))
logging.info("SITE_DOMAIN: {}".format(SITE_DOMAIN))
logging.info("FRONTEND_DOMAIN: {}".format(FRONTEND_DOMAIN))
print("DEBUG: {}".format(DEBUG))
print("RUNNING_DEVELOPMENT_SERVER: {}".format(RUNNING_DEVELOPMENT_SERVER))
print("SITE_DOMAIN: {}".format(SITE_DOMAIN))
print("FRONTEND_DOMAIN: {}".format(FRONTEND_DOMAIN))

ALLOWED_HOSTS = [
'localhost',
Expand Down
2 changes: 1 addition & 1 deletion promptsmith/settings_debug.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
DEBUG = True


logging.info("load debug settings")
print("load debug settings")
2 changes: 1 addition & 1 deletion promptsmith/settings_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@
}
}

logging.info("load production settings")
print("load production settings")

0 comments on commit 2520572

Please sign in to comment.