Skip to content

Commit

Permalink
improve2 get_log_file
Browse files Browse the repository at this point in the history
  • Loading branch information
ali96343 committed Oct 27, 2023
1 parent ef32e91 commit 876d4ad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion py4web/server_adapters.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# export PY4WEB_LOGS=/tmp # export PY4WEB_LOGS=
def get_log_file(out_banner = True):
log_dir = os.environ.get("PY4WEB_LOGS", None)
if os.path.isdir(log_dir):
if log_dir and os.path.isdir(log_dir):
log_file = os.path.join (log_dir, 'server-py4web.log')
if out_banner:
print(f"log_file: {log_file}")
Expand Down

0 comments on commit 876d4ad

Please sign in to comment.