Skip to content

Commit

Permalink
Merge pull request #10 from viniciusjusten/vj/check-logger-before-clo…
Browse files Browse the repository at this point in the history
…sing-polyglot-logger

check logger before closing polyglot logger
  • Loading branch information
guilhermebodin authored Mar 15, 2024
2 parents 90e3a49 + 0d176f5 commit 7de6df6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "LoggingPolyglot"
uuid = "211639cc-9b11-4cfd-abc6-8f7477829344"
version = "0.3.0"
version = "0.3.1"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
4 changes: 3 additions & 1 deletion src/logs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ function fatal_error(
@logmsg FATAL_ERROR_LEVEL msg

logger = Logging.global_logger()
close_polyglot_logger(logger)
if logger isa LoggingExtras.TeeLogger
close_polyglot_logger(logger)
end
throw(exception)
return nothing
end
Expand Down

2 comments on commit 7de6df6

@guilhermebodin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/102964

Tip: Release Notes

Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.

@JuliaRegistrator register

Release notes:

## Breaking changes

- blah

To add them here just re-invoke and the PR will be updated.

Tagging

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.3.1 -m "<description of version>" 7de6df66fc8949f1cf424f183f4430c5a59d686f
git push origin v0.3.1

Please sign in to comment.