From b1ea7997b1c47403e37009029114f9c61d1e714a Mon Sep 17 00:00:00 2001 From: Paul Berg Date: Wed, 9 Oct 2024 17:41:51 +0200 Subject: [PATCH] conditionally define showvalue based on version --- src/GitHubActions.jl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/GitHubActions.jl b/src/GitHubActions.jl index c1fe9e8..96da509 100644 --- a/src/GitHubActions.jl +++ b/src/GitHubActions.jl @@ -20,6 +20,8 @@ export using Logging: Logging, AbstractLogger, LogLevel, Debug, Info, Warn, Error +const showvalue = VERSION ≥ v"1.11.0-DEV.1786" ? Base.CoreLogging.showvalue : Logging.showvalue + using JSON: json const CMD_MARKER = "::" @@ -256,7 +258,7 @@ function Logging.handle_message( end message = string(msg) for (k, v) in kwargs - result = sprint(Logging.showvalue, v) + result = sprint(showvalue, v) message *= "\n $k = " * if occursin('\n', result) replace("\n" * result, '\n' => "\n ") else