echo icon indicating copy to clipboard operation
echo copied to clipboard

Use Logger for startup message "http[s] server started on ..."

Open andygrunwald opened this issue 4 years ago • 5 comments

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.

andygrunwald avatar Mar 28 '21 17:03 andygrunwald

Codecov Report

Merging #1826 (005c858) into master (dec96f0) will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@           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 data Powered by Codecov. Last update dec96f0...005c858. Read the comment docs.

codecov[bot] avatar Mar 28 '21 17:03 codecov[bot]

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.

stale[bot] avatar Jun 26 '21 03:06 stale[bot]

/unstale

Any news on this? Anything I can do to push this?

andygrunwald avatar Jun 26 '21 05:06 andygrunwald

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.

stale[bot] avatar Jan 09 '22 00:01 stale[bot]

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

aldas avatar Jan 09 '22 14:01 aldas