gperdrizet commited on
Commit
e55b547
·
verified ·
1 Parent(s): f80cf2d

Removed datetime from logging and updated config to clear logfile each run

Browse files
Files changed (1) hide show
  1. functions/gradio.py +2 -2
functions/gradio.py CHANGED
@@ -26,9 +26,9 @@ for handler in logging.root.handlers[:]:
26
  # Configure logging to write to file and console
27
  logging.basicConfig(
28
  level=logging.INFO,
29
- format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
30
  handlers=[
31
- logging.FileHandler(logs_dir / "gradio.log"),
32
  logging.StreamHandler() # Also log to console
33
  ]
34
  )
 
26
  # Configure logging to write to file and console
27
  logging.basicConfig(
28
  level=logging.INFO,
29
+ format='%(name)s - %(levelname)s - %(message)s',
30
  handlers=[
31
+ logging.FileHandler(logs_dir / "gradio.log", mode='w'), # Log to file
32
  logging.StreamHandler() # Also log to console
33
  ]
34
  )