echo
echo copied to clipboard
Use Logger for startup message "http[s] server started on ..."
What type of PR is this?
feature/enhancement
What this PR does / why we need it:
When a new echo server is started, a message will be written to the defined output like
http server started on [::]:8282
The echo framework is supporting a logging interface including logging levels. When using this interface, the first message (when the banner is disabled), has no logging level.
In my opinion (feel free to challenge), booting up the server can be treated as an INFO log event.
In my use case, I use https://github.com/ziflex/lecho. A logging implementation for echo based on https://github.com/rs/zerolog. This leads to a logging output like
2021-03-28T18:43:14+02:00 ??? ⇨ http server started on [::]:8282
The ??? is typically a logging level like INF or WRN.
Does this PR introduce a user-facing change?:
No
Additional Information
This PR might be opinionated. Let me know what you think.
Codecov Report
Merging #1826 (005c858) into master (dec96f0) will not change coverage. The diff coverage is
100.00%.
@@ Coverage Diff @@
## master #1826 +/- ##
=======================================
Coverage 89.49% 89.49%
=======================================
Files 32 32
Lines 2685 2685
=======================================
Hits 2403 2403
Misses 181 181
Partials 101 101
| Impacted Files | Coverage Δ | |
|---|---|---|
| echo.go | 91.64% <100.00%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update dec96f0...005c858. Read the comment docs.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed within a month if no further activity occurs. Thank you for your contributions.
/unstale
Any news on this? Anything I can do to push this?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed within a month if no further activity occurs. Thank you for your contributions.
This is done in v5 proposal. Coloring is removed from whole Echo and startup messages are logged into logger. See this discussion for details https://github.com/labstack/echo/discussions/2000