improving logging

This commit is contained in:
Julien Neuhart
2019-07-08 11:06:26 +02:00
parent 5af01505c2
commit 70b185a37a
11 changed files with 49 additions and 28 deletions

View File

@@ -12,6 +12,7 @@ import (
func HTML(c echo.Context) error {
const op = "handler.HTML"
ctx := context.MustCastFromEchoContext(c)
ctx.StandardLogger().DebugfOp(op, "html request")
r := ctx.Resource()
opts, err := r.ChromePrinterOptions()
if err != nil {

View File

@@ -12,6 +12,7 @@ import (
func Markdown(c echo.Context) error {
const op = "handler.Markdown"
ctx := context.MustCastFromEchoContext(c)
ctx.StandardLogger().DebugfOp(op, "markdown request")
r := ctx.Resource()
opts, err := r.ChromePrinterOptions()
if err != nil {

View File

@@ -12,6 +12,7 @@ import (
func Merge(c echo.Context) error {
const op = "handler.Merge"
ctx := context.MustCastFromEchoContext(c)
ctx.StandardLogger().DebugfOp(op, "merge request")
r := ctx.Resource()
opts, err := r.MergePrinterOptions()
if err != nil {

View File

@@ -12,6 +12,7 @@ import (
func Office(c echo.Context) error {
const op = "handler.Office"
ctx := context.MustCastFromEchoContext(c)
ctx.StandardLogger().DebugfOp(op, "office request")
r := ctx.Resource()
opts, err := r.OfficePrinterOptions()
if err != nil {

View File

@@ -13,6 +13,7 @@ import (
func URL(c echo.Context) error {
const op = "handler.URL"
ctx := context.MustCastFromEchoContext(c)
ctx.StandardLogger().DebugfOp(op, "url request")
r := ctx.Resource()
opts, err := r.ChromePrinterOptions()
if err != nil {