Skip to content

Commit aa6cdc5

Browse files
committed
Minor tweaks
* Make file key immune to non-strings being specified * Parse some MIME strings at compile time
1 parent 955bf3f commit aa6cdc5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/TerminalLogger.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ function default_metafmt(level, _module, group, id, file, line)
6868
_module !== nothing && (suffix *= "$(_module)")
6969
if file !== nothing
7070
_module !== nothing && (suffix *= " ")
71-
suffix *= file
71+
suffix *= string(file)
7272
if line !== nothing
7373
suffix *= ":$(isa(line, UnitRange) ? "$(first(line))-$(last(line))" : line)"
7474
end
@@ -148,10 +148,10 @@ function showvalue(io, key, msg)
148148
Base.show_exception_stack(io, msg)
149149
else
150150
# v1.0 and 1.1 don't have Base.show_exception_stack
151-
show(io, "text/plain", msg)
151+
show(io, MIME"text/plain"(), msg)
152152
end
153153
else
154-
show(io, "text/plain", msg)
154+
show(io, MIME"text/plain"(), msg)
155155
end
156156
end
157157
function showvalue(io, key, e::Tuple{Exception,Any})

0 commit comments

Comments
 (0)