From b7821e47e094aa198e347951bf8d4cb6c1713ec1 Mon Sep 17 00:00:00 2001 From: Megan Dawson Date: Fri, 25 Jul 2025 14:12:01 +1000 Subject: [PATCH 1/5] update to be in sync --- Project.toml | 2 +- src/LoggingStream.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 7473ec6..0f15302 100644 --- a/Project.toml +++ b/Project.toml @@ -7,7 +7,7 @@ version = "0.1.1" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" [compat] -julia = "1.4" +julia = "1.11" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" diff --git a/src/LoggingStream.jl b/src/LoggingStream.jl index fb3fb21..f1ec10c 100644 --- a/src/LoggingStream.jl +++ b/src/LoggingStream.jl @@ -31,7 +31,7 @@ function Base.unsafe_write(s::LoggingStream, p::Ptr{UInt8}, n::UInt) # # NOTE: These refer to internals of CoreLogging and will need to be kept in # sync if things change upstream. - if #==# level >= Base.CoreLogging._min_enabled_level[] && + if #==# level.level >= Base.CoreLogging._min_enabled_level[] && level >= s.logstate.min_enabled_level && Logging.shouldlog(s.logger, level, _module, group, id) m = (n > 0 && unsafe_load(p, n) == UInt8('\n')) ? n-1 : n From 7d1882a88ffb90b42342176528f6db2ea4b528dc Mon Sep 17 00:00:00 2001 From: Megan Dawson Date: Fri, 25 Jul 2025 14:27:07 +1000 Subject: [PATCH 2/5] handle both cases --- src/LoggingStream.jl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/LoggingStream.jl b/src/LoggingStream.jl index f1ec10c..809f365 100644 --- a/src/LoggingStream.jl +++ b/src/LoggingStream.jl @@ -31,7 +31,8 @@ function Base.unsafe_write(s::LoggingStream, p::Ptr{UInt8}, n::UInt) # # NOTE: These refer to internals of CoreLogging and will need to be kept in # sync if things change upstream. - if #==# level.level >= Base.CoreLogging._min_enabled_level[] && + if #==# ((Base.CoreLogging._min_enabled_level[] isa Int32 && level.level >= Base.CoreLogging._min_enabled_level[]) || + level >= Base.CoreLogging._min_enabled_level[]) && level >= s.logstate.min_enabled_level && Logging.shouldlog(s.logger, level, _module, group, id) m = (n > 0 && unsafe_load(p, n) == UInt8('\n')) ? n-1 : n From 8c750adcbc8b23c334893777a7969d37cf2b5aa5 Mon Sep 17 00:00:00 2001 From: Megan Dawson Date: Fri, 25 Jul 2025 14:27:33 +1000 Subject: [PATCH 3/5] compat back --- Project.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 0f15302..7473ec6 100644 --- a/Project.toml +++ b/Project.toml @@ -7,7 +7,7 @@ version = "0.1.1" Logging = "56ddb016-857b-54e1-b83d-db4d58db5568" [compat] -julia = "1.11" +julia = "1.4" [extras] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" From 89e822d9e403e0bc754da24945f58b9435803032 Mon Sep 17 00:00:00 2001 From: Megan Dawson Date: Fri, 25 Jul 2025 14:29:17 +1000 Subject: [PATCH 4/5] update github action --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aa92eb0..e79ae31 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: version: - '1.4' - '1.6' + - '1.11' - '1' - 'nightly' os: @@ -38,7 +39,7 @@ jobs: with: version: ${{ matrix.version }} arch: ${{ matrix.arch }} - - uses: actions/cache@v1 + - uses: actions/cache@v3 env: cache-name: cache-artifacts with: From f3286df1432050d244869d287b3682123303895e Mon Sep 17 00:00:00 2001 From: Megan Dawson Date: Tue, 29 Jul 2025 11:48:51 +1000 Subject: [PATCH 5/5] feedback from Andy --- .github/workflows/ci.yml | 3 +-- src/LoggingStream.jl | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e79ae31..30fb9f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,9 +13,8 @@ jobs: strategy: matrix: version: - - '1.4' - '1.6' - - '1.11' + - '1.10' - '1' - 'nightly' os: diff --git a/src/LoggingStream.jl b/src/LoggingStream.jl index 809f365..db88f1e 100644 --- a/src/LoggingStream.jl +++ b/src/LoggingStream.jl @@ -31,8 +31,7 @@ function Base.unsafe_write(s::LoggingStream, p::Ptr{UInt8}, n::UInt) # # NOTE: These refer to internals of CoreLogging and will need to be kept in # sync if things change upstream. - if #==# ((Base.CoreLogging._min_enabled_level[] isa Int32 && level.level >= Base.CoreLogging._min_enabled_level[]) || - level >= Base.CoreLogging._min_enabled_level[]) && + if #==# (VERSION >= v"1.10" ? level.level >= Base.CoreLogging._min_enabled_level[] : level >= Base.CoreLogging._min_enabled_level[]) && level >= s.logstate.min_enabled_level && Logging.shouldlog(s.logger, level, _module, group, id) m = (n > 0 && unsafe_load(p, n) == UInt8('\n')) ? n-1 : n