Skip to content

Commit

Permalink
Update LogRoller.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
krynju authored Oct 22, 2024
1 parent e8bf2ac commit 60b25f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/LogRoller.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ using JSON.Serializations: CommonSerialization, StandardSerialization
using JSON.Writer: StructuralContext
import JSON: show_json

import Logging: shouldlog, min_enabled_level, catch_exceptions, handle_message
import Logging: Logging, shouldlog, min_enabled_level, catch_exceptions, handle_message
import Base: write, close, rawhandle
export RollingLogger, RollingFileWriter, postrotate

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

const showvalue = VERSION v"1.11.0-DEV.1786" ? Base.CoreLogging.showvalue : Logging.showvalue

include("limitio.jl")
include("log_utils.jl")

Expand Down Expand Up @@ -223,7 +225,7 @@ function handle_message(logger::RollingLogger, level, message, _module, group, i
for (key, val) in kwargs
kwarg_timestamp && (key === logger.timestamp_identifier) && continue
print(iob, "", key, " = ")
Logging.showvalue(iob, val)
showvalue(iob, val)
println(iob)
end
println(iob, "└ @ ", something(_module, "nothing"), " ", something(filepath, "nothing"), ":", something(line, "nothing"))
Expand Down

0 comments on commit 60b25f2

Please sign in to comment.