Skip to content

Commit 14bfd1b

Browse files
committed
Remove backwards compatible field access
1 parent 9738b3c commit 14bfd1b

File tree

2 files changed

+1
-10
lines changed

2 files changed

+1
-10
lines changed

src/Sinks/datetime_rotation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function DatetimeRotatingFileLogger(f::Union{Function,Nothing}, dir, filename_pa
7171
end
7272

7373
similar_logger(::SimpleLogger, io) = SimpleLogger(io, BelowMinLevel)
74-
similar_logger(l::FormatLogger, io) = FormatLogger(l.f, io, l.always_flush)
74+
similar_logger(l::FormatLogger, io) = FormatLogger(l.formatter, io, l.always_flush)
7575
function reopen!(drfl::DatetimeRotatingFileLogger)
7676
if drfl.current_file !== nothing
7777
# close the old IOStream and pass the file to the callback

src/Sinks/formatlogger.jl

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,3 @@ end
6262
shouldlog(logger::FormatLogger, arg...) = true
6363
min_enabled_level(logger::FormatLogger) = BelowMinLevel
6464
catch_exceptions(logger::FormatLogger) = true # Or false? SimpleLogger doesn't, ConsoleLogger does.
65-
66-
# For backwards compatibility
67-
function Base.getproperty(logger::FormatLogger, f::Symbol)
68-
return if f === :f
69-
getfield(logger, :formatter)
70-
else
71-
getfield(logger, f)
72-
end
73-
end

0 commit comments

Comments
 (0)