Skip to content

Commit 2da92d6

Browse files
committed
Docstring and comment updates
1 parent b02ddad commit 2da92d6

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

src/Sinks/formatlogger.jl

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@ end
88
FormatLogger(formatter, io::IO=stderr; always_flush=true)
99
1010
Logger sink that formats the message and finally writes to `io`.
11-
The formatting function should be of the form `formatter(io::IOContext, log::NamedTuple)`
12-
where `log` has the following fields:
11+
The formatting function or callable object should be of the form
12+
`formatter(io::IOContext, log::NamedTuple)` where `log` has the following fields:
1313
`(level, message, _module, group, id, file, line, kwargs)`.
14-
See [`LoggingExtras.handle_message_args`](@ref) for more information on what field is.
14+
15+
See [`LoggingExtras.handle_message_args`](@ref) for more information on what each field is.
1516
1617
# Examples
1718
```julia-repl
@@ -36,8 +37,8 @@ end
3637
"""
3738
FormatLogger(formatter, path::AbstractString; append=false, always_flush=true)
3839
39-
Logger sink that formats the message and writes it to the file at `path`. This is similar
40-
to `FileLogger` except that it allows specifying the printing format.
40+
Logger sink that formats the message and writes it to the file at `path`. This is similar
41+
to [`FileLogger`](@ref) except that it allows specifying the printing format.
4142
4243
To append to the file (rather than truncating the file first), use `append=true`.
4344
If `always_flush=true` the stream is flushed after every handled log message.

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ end
197197
end
198198
end
199199

200-
# NOTE: this intentionally does not subtype Function
200+
# Intentionally not subtype `Function` here to test function-like object support
201201
Base.@kwdef struct BasicLogFormatter
202202
include_module::Bool=true
203203
end

0 commit comments

Comments
 (0)