1
0
mirror of https://github.com/labstack/echo.git synced 2024-12-24 20:14:31 +02:00
echo/middleware
moznion ddb66e1ba2
Add logger middleware template variables: ${time_unix_milli} and ${time_unix_micro} (#2206)
This patch introduces two template variables `${time_unix_milli}` and
`${time_unix_micro}` into the logger middleware.
Currently, there is no way to interpolate that UNIX milli and micro
seconds timestamp in a log entry, and go 1.17 or later runtime supports
the utility functions `time#UnixMilli()` and `time#UnixMicro()`
so this patch adds them as well.

see also: https://github.com/golang/go/issues/44196

Signed-off-by: moznion <moznion@mail.moznion.net>
2022-07-05 07:57:39 +03:00
..
basic_auth_test.go fix: basic auth invalid base64 string (#2191) 2022-05-27 19:44:51 +03:00
basic_auth.go fix: basic auth invalid base64 string (#2191) 2022-05-27 19:44:51 +03:00
body_dump_test.go Introduced Go module support as v4, removed obsolete CloseNotifier() mechanism 2019-01-30 16:11:42 +02:00
body_dump.go Fixed comment typo in BodyDump (#1431) 2019-10-30 17:34:27 -07:00
body_limit_test.go Fix body_limit middleware unit test 2022-04-05 20:34:49 +03:00
body_limit.go Introduced Go module support as v4, removed obsolete CloseNotifier() mechanism 2019-01-30 16:11:42 +02:00
compress_test.go Fixed a problem that returned wrong content-encoding when the gzip compressed content was empty (#1921) 2021-12-15 10:15:13 +02:00
compress.go Fixed a problem that returned wrong content-encoding when the gzip compressed content was empty (#1921) 2021-12-15 10:15:13 +02:00
cors_test.go Allow header support in Router, MethodNotFoundHandler (405) and CORS middleware 2022-01-03 21:04:17 +02:00
cors.go improve docs 2022-01-03 21:04:17 +02:00
csrf_test.go JWT, KeyAuth, CSRF multivalue extractors (#2060) 2022-01-24 22:03:45 +02:00
csrf.go JWT, KeyAuth, CSRF multivalue extractors (#2060) 2022-01-24 22:03:45 +02:00
decompress_test.go Increasing Decompress Middleware coverage 2020-11-28 02:03:54 +00:00
decompress.go stream decompression instead of buffering (#2018) 2021-12-03 11:03:42 +01:00
extractor_test.go Fix CSRF middleware not being able to extract token from multipart/form-data form (#2136, fixes #2135) 2022-03-16 00:43:20 +01:00
extractor.go Fix CSRF middleware not being able to extract token from multipart/form-data form (#2136, fixes #2135) 2022-03-16 00:43:20 +01:00
jwt_test.go JWT, KeyAuth, CSRF multivalue extractors (#2060) 2022-01-24 22:03:45 +02:00
jwt.go JWT, KeyAuth, CSRF multivalue extractors (#2060) 2022-01-24 22:03:45 +02:00
key_auth_test.go JWT, KeyAuth, CSRF multivalue extractors (#2060) 2022-01-24 22:03:45 +02:00
key_auth.go JWT, KeyAuth, CSRF multivalue extractors (#2060) 2022-01-24 22:03:45 +02:00
logger_test.go Add logger middleware template variables: ${time_unix_milli} and ${time_unix_micro} (#2206) 2022-07-05 07:57:39 +03:00
logger.go Add logger middleware template variables: ${time_unix_milli} and ${time_unix_micro} (#2206) 2022-07-05 07:57:39 +03:00
method_override_test.go Introduced Go module support as v4, removed obsolete CloseNotifier() mechanism 2019-01-30 16:11:42 +02:00
method_override.go Introduced Go module support as v4, removed obsolete CloseNotifier() mechanism 2019-01-30 16:11:42 +02:00
middleware_test.go Allow proxy middleware to use query part in rewrite (fix #1798) (#1802) 2021-03-09 13:22:11 +01:00
middleware.go JWT, KeyAuth, CSRF multivalue extractors (#2060) 2022-01-24 22:03:45 +02:00
proxy_test.go Add Go 1.16 to CI and drop 1.12 specific code (#1850) 2021-04-16 11:38:12 +02:00
proxy.go Add Go 1.16 to CI and drop 1.12 specific code (#1850) 2021-04-16 11:38:12 +02:00
rate_limiter_test.go improve code quality (#1792) 2021-02-26 12:04:34 +02:00
rate_limiter.go Added comments for RateLimiterMemoryStoreConfig and RateLimiterMemoryStore 2021-11-21 18:22:14 +02:00
recover_test.go Recover middleware should not log panic for aborted handler (#2134, fixes #2133) 2022-03-16 00:29:42 +01:00
recover.go Recover middleware should not log panic for aborted handler (#2134, fixes #2133) 2022-03-16 00:29:42 +01:00
redirect_test.go Fix panic in redirect middleware on short host name (fix #1811) (#1813) 2021-04-06 09:11:31 +02:00
redirect.go Fix panic in redirect middleware on short host name (fix #1811) (#1813) 2021-04-06 09:11:31 +02:00
request_id_test.go Add support for configurable target header for the request_id middleware 2021-12-07 21:34:16 +02:00
request_id.go Add support for configurable target header for the request_id middleware 2021-12-07 21:34:16 +02:00
request_logger_test.go Add start time to request logger middleware values (#1991) 2021-09-23 23:17:09 +03:00
request_logger.go Add start time to request logger middleware values (#1991) 2021-09-23 23:17:09 +03:00
rewrite_test.go Allow proxy middleware to use query part in rewrite (fix #1798) (#1802) 2021-03-09 13:22:11 +01:00
rewrite.go Allow proxy middleware to use query part in rewrite (fix #1798) (#1802) 2021-03-09 13:22:11 +01:00
secure_test.go Add ReferrerPolicy to Secure middleware (#1363) 2019-08-01 15:27:09 -07:00
secure.go Add ReferrerPolicy to Secure middleware (#1363) 2019-08-01 15:27:09 -07:00
slash_test.go Fix open redirect vulnerability with AddTrailingSlashWithConfig and RemoveTrailingSlashWithConfig (#1775,#1771) 2021-02-11 14:53:22 +01:00
slash.go Fix open redirect vulnerability with AddTrailingSlashWithConfig and RemoveTrailingSlashWithConfig (#1775,#1771) 2021-02-11 14:53:22 +01:00
static_1_16_test.go Fix #1787: Add support for optional filesystem to the static middleware (#1797) 2021-05-08 22:33:17 +03:00
static_test.go Fix #1787: Add support for optional filesystem to the static middleware (#1797) 2021-05-08 22:33:17 +03:00
static.go Fix #1787: Add support for optional filesystem to the static middleware (#1797) 2021-05-08 22:33:17 +03:00
timeout_test.go Timeout mw: rework how test waits for timeout. Using sleep as delay i… (#2187) 2022-05-22 00:21:50 +03:00
timeout.go Timeout middleware write race 2022-03-16 08:09:29 +02:00
util_test.go Set subdomains to AllowOrigins with wildcard (#1301) 2019-03-09 10:32:49 -08:00
util.go Set subdomains to AllowOrigins with wildcard (#1301) 2019-03-09 10:32:49 -08:00