Skip to content

Commit

Permalink
fix gitAction build
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronan committed Sep 19, 2024
1 parent c6e6286 commit 1376366
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pyroengine/logger_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
log_format = "%(asctime)s | %(levelname)s: %(message)s"
os.makedirs(os.path.dirname("/var/log/engine.log"), exist_ok=True)

if not os.path.exists("/var/log/engine.log"):
open("/var/log/engine.log", "a").close() # Create the file if it doesn't exist

os.chmod("/var/log/engine.log", 0o664)

Check failure on line 12 in pyroengine/logger_config.py

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

pyroengine/logger_config.py#L12

Chmod setting a permissive mask 0o664 on file (/var/log/engine.log).

# Create a StreamHandler (for stdout)
stream_handler = logging.StreamHandler()
stream_handler.setFormatter(logging.Formatter(log_format))
Expand Down

0 comments on commit 1376366

Please sign in to comment.