Skip to content

Commit

Permalink
conditionally define showvalue based on version (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pangoraw authored Oct 10, 2024
1 parent e988cc2 commit 476def1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/GitHubActions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "::"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 476def1

Please sign in to comment.