Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the logging interface add SetHeader method #1092

merged 1 commit into from Sep 28, 2018


None yet
3 participants
Copy link

dreamans commented Mar 21, 2018

Add SetHeader method in Logger interface, and we can customize log formats like this:

e := echo.New()
e.Logger.SetHeader(`[${time_unix}] [${level}] {"time":"${time_unix}","file":"${short_file}","line":"${line}"}`)


[2018-03-21T14:49:06+08:00] [ERROR] {"time":":1521616167,","file":"log.go","line":"309","message":"code=404, message=Not Found"}

This comment has been minimized.

Copy link

codecov bot commented Mar 21, 2018

Codecov Report

Merging #1092 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1092   +/-   ##
  Coverage   81.06%   81.06%           
  Files          27       27           
  Lines        1901     1901           
  Hits         1541     1541           
  Misses        253      253           
  Partials      107      107

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 a5d81b8...e465d80. Read the comment docs.


vishr approved these changes Sep 28, 2018

@vishr vishr merged commit 036e696 into labstack:master Sep 28, 2018

3 checks passed

codecov/patch Coverage not affected when comparing a5d81b8...e465d80
codecov/project 81.06% remains the same compared to a5d81b8
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.

Copy link

vishr commented Sep 28, 2018

@dreamans thanks for your contribution 🎉

@ferhatelmas ferhatelmas referenced this pull request Nov 5, 2018


Doesn't work above 3.3.7 #1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.