mirror of
https://github.com/kataras/iris.git
synced 2025-12-17 18:07:01 +00:00
add an accesslog simple example
This commit is contained in:
@@ -15,6 +15,7 @@ func main() {
|
||||
|
||||
app := iris.New()
|
||||
ac := accesslog.File("./access.log").AddOutput(app.Logger().Printer)
|
||||
defer ac.Close()
|
||||
|
||||
// 1. Register a field.
|
||||
ac.AddFields(func(ctx iris.Context, fields *accesslog.Fields) {
|
||||
|
||||
Reference in New Issue
Block a user