Skip to content

Commit b53582d

Browse files
authored
Merge pull request #19 from krynju/patch-2
1.11 showvalue is now in BaseCoreLogging
2 parents e8bf2ac + 76ce409 commit b53582d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ uuid = "c41e01d8-14e5-11ea-185b-e7eabed7be4b"
33
keywords = ["log", "rotate", "roller", "logrotate"]
44
license = "MIT"
55
authors = ["Tanmay Mohapatra <[email protected]>"]
6-
version = "0.5.0"
6+
version = "0.5.1"
77

88
[compat]
99
julia = "1.8"

src/LogRoller.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ module LogRoller
33
using Dates
44
using Logging
55
using CodecZlib
6-
using Logging
76
using JSON
87
using JSON.Serializations: CommonSerialization, StandardSerialization
98
using JSON.Writer: StructuralContext
@@ -16,6 +15,8 @@ export RollingLogger, RollingFileWriter, postrotate
1615
const BUFFSIZE = 1024*16 # try and read 16K pages when possible
1716
const DEFAULT_MAX_LOG_ENTRY_SIZE = 256*1024
1817

18+
const showvalue = VERSION v"1.11.0-DEV.1786" ? Base.CoreLogging.showvalue : Logging.showvalue
19+
1920
include("limitio.jl")
2021
include("log_utils.jl")
2122

@@ -223,7 +224,7 @@ function handle_message(logger::RollingLogger, level, message, _module, group, i
223224
for (key, val) in kwargs
224225
kwarg_timestamp && (key === logger.timestamp_identifier) && continue
225226
print(iob, "", key, " = ")
226-
Logging.showvalue(iob, val)
227+
showvalue(iob, val)
227228
println(iob)
228229
end
229230
println(iob, "└ @ ", something(_module, "nothing"), " ", something(filepath, "nothing"), ":", something(line, "nothing"))

0 commit comments

Comments
 (0)