diff --git a/README.md b/README.md index 6442c761..fa9449ce 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,8 @@ Learn what [others saying about Iris](https://iris-go.com/testimonials/) and **[ ## 👑 Supporters
+
+
diff --git a/middleware/accesslog/accesslog.go b/middleware/accesslog/accesslog.go
index 89bc4541..eb7446d6 100644
--- a/middleware/accesslog/accesslog.go
+++ b/middleware/accesslog/accesslog.go
@@ -193,6 +193,8 @@ const (
LogStack
)
+const defaultTimeFormat = "2006-01-02 15:04:05"
+
// New returns a new AccessLog value with the default values.
// Writes to the "w". Output be further modified through its `Set/AddOutput` methods.
// Register by its `Handler` method.
@@ -205,7 +207,7 @@ const (
func New(w io.Writer) *AccessLog {
ac := &AccessLog{
Clock: clockFunc(time.Now),
- TimeFormat: "2006-01-02 15:04:05",
+ TimeFormat: defaultTimeFormat,
IP: true,
BytesReceived: true,
BytesSent: true,