diff --git a/src/types.jl b/src/types.jl index 5082190..e9791da 100644 --- a/src/types.jl +++ b/src/types.jl @@ -23,7 +23,7 @@ name and the artifact location specified previously. Also it contains a more information, see [MLFlowClient.jl](https://juliaai.github.io/MLFlowClient.jl/dev/reference/#MLFlowClient.MLFlow). """ -struct Logger +mutable struct Logger service::MLFlow verbosity::Int experiment_name::String @@ -56,7 +56,7 @@ operations from the `_logging_channel`. This function closes the channel to stop the background loop. """ function close(logger::Logger) - close(logger._logging_channel) + Base.close(logger._logging_channel) end """ diff --git a/test/types.jl b/test/types.jl index 1b63ac2..93714ca 100644 --- a/test/types.jl +++ b/test/types.jl @@ -11,4 +11,9 @@ " artifact_location=\"$(logger.artifact_location)\",\n" * ") using MLFlow API version $(logger.service.apiversion)" @test String(take!(io)) == test_string + + MLJFlow.close(logger) + @test ~(Base.isopen(logger._logging_channel)) + logger._logging_channel = MLJFlow.open_logging_channel() + @test Base.isopen(logger._logging_channel) end