Skip to content

Commit 60b25f2

Browse files
authored
Update LogRoller.jl
1 parent e8bf2ac commit 60b25f2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/LogRoller.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ using JSON.Serializations: CommonSerialization, StandardSerialization
99
using JSON.Writer: StructuralContext
1010
import JSON: show_json
1111

12-
import Logging: shouldlog, min_enabled_level, catch_exceptions, handle_message
12+
import Logging: Logging, shouldlog, min_enabled_level, catch_exceptions, handle_message
1313
import Base: write, close, rawhandle
1414
export RollingLogger, RollingFileWriter, postrotate
1515

1616
const BUFFSIZE = 1024*16 # try and read 16K pages when possible
1717
const DEFAULT_MAX_LOG_ENTRY_SIZE = 256*1024
1818

19+
const showvalue = VERSION v"1.11.0-DEV.1786" ? Base.CoreLogging.showvalue : Logging.showvalue
20+
1921
include("limitio.jl")
2022
include("log_utils.jl")
2123

@@ -223,7 +225,7 @@ function handle_message(logger::RollingLogger, level, message, _module, group, i
223225
for (key, val) in kwargs
224226
kwarg_timestamp && (key === logger.timestamp_identifier) && continue
225227
print(iob, "", key, " = ")
226-
Logging.showvalue(iob, val)
228+
showvalue(iob, val)
227229
println(iob)
228230
end
229231
println(iob, "└ @ ", something(_module, "nothing"), " ", something(filepath, "nothing"), ":", something(line, "nothing"))

0 commit comments

Comments
 (0)