Skip to content

Commit

Permalink
rolling back stderr capturing
Browse files Browse the repository at this point in the history
  • Loading branch information
tlienart committed Jul 24, 2023
1 parent a417ae9 commit acdf26f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "LiveServer"
uuid = "16fef848-5104-11e9-1b77-fb7a48bbb589"
authors = ["Jonas Asprion <[email protected]", "Thibaut Lienart <[email protected]>"]
version = "1.2.5"
version = "1.2.6"

[deps]
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3"
Expand Down
14 changes: 0 additions & 14 deletions src/server.jl
Original file line number Diff line number Diff line change
Expand Up @@ -618,15 +618,6 @@ current directory. (See also [`example`](@ref) for an example folder).
)
end

old_logger = global_logger()
old_stderr = stderr
global_logger(
EarlyFilteredLogger(
log -> log._module !== HTTP.Servers,
global_logger()
)
)

server, port = get_server(host, port, req_handler)
host_str = ifelse(host == string(Sockets.localhost), "localhost", host)
url = "http://$host_str:$port"
Expand Down Expand Up @@ -685,11 +676,6 @@ current directory. (See also [`example`](@ref) for an example folder).
reset_ws_interrupt()
println("")
end
# given that LiveServer is interrupted via an InterruptException, we have
# to be extra careful that things are back as they were before, otherwise
# there's a high risk of the disgusting broken pipe error...
redirect_stderr(old_stderr)
global_logger(old_logger)
return nothing
end

Expand Down

0 comments on commit acdf26f

Please sign in to comment.