Skip to content

Commit

Permalink
Fix logger bug
Browse files Browse the repository at this point in the history
  • Loading branch information
vbousquet committed Aug 22, 2023
1 parent 891c86f commit 26ddf9c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions addons/vpx_lightmapper/vlm_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,11 @@ def get_render_proj_ar(context):


def run_with_logger(op):
log_handler = logging.FileHandler(bpy.path.abspath("//vlm.log"))
#log_handler = logging.handlers.RotatingFileHandler(bpy.path.abspath("//vlm.log"), maxBytes=(1048576*5), backupCount=7)
#log_handler = logging.FileHandler(bpy.path.abspath("//vlm.log"))
log_handler = logging.handlers.RotatingFileHandler(bpy.path.abspath("//vlm.log"), maxBytes=(1024*1024*4), backupCount=3)
try:
while logger.hasHandlers():
logger.removeHandler(logger.handlers[0])
#while logger.hasHandlers():
# logger.removeHandler(logger.handlers[0])
logger.addHandler(log_handler)
logger.addHandler(logging.StreamHandler())
return op()
Expand Down

0 comments on commit 26ddf9c

Please sign in to comment.