Skip to content

Commit

Permalink
Remember to detach logger in
Browse files Browse the repository at this point in the history
  • Loading branch information
techbech committed Feb 1, 2024
1 parent 1ca1e15 commit c97355a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ of every change, see the Git log.

Latest
------
* Patch: Remember to detach logger in `project_version`.
* Minor: Added project_version as a function on the Context object.
* Patch: Added dependency paths for resolve conflicts.
* Patch: Fix ``--no_resolve`` option.
Expand Down
3 changes: 3 additions & 0 deletions src/wurf/waf_conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ def project_version(ctx):

log_path = os.path.join(bldnode.abspath(), "version.log")

old_logger = ctx.logger
ctx.logger = Logs.make_logger(path=log_path, name="version")
ctx.logger.debug("wurf: project version execute")

Expand Down Expand Up @@ -223,3 +224,5 @@ def project_version(ctx):
except error.CmdAndLogError as e:
ctx.logger.debug(f"wurf: project version failed: {e}")
return None
finally:
ctx.logger = old_logger

0 comments on commit c97355a

Please sign in to comment.