A user of my plugin has asked that some logging is sent to the DEBUG level so I am trying to follow the advice here until there is proper access to the logger.
I have added two test lines to func New
to test this logging (in localPlugins
mode):
fmt.Printf("======> test fmt.Printf")
log.Printf("======> test log.Printf")
however I can only see output from log.Printf
; fmt.Printf
does not appear to be sending message to the DEBUG level via stdout.
traefik_proxy.1.njo7mvjm87de@docker-desktop | time="2024-12-28T18:21:03Z" level=debug msg="Added outgoing tracing middleware whoami" middlewareName=tracing middlewareType=TracingForwar
der entryPointName=http routerName=whoami@docker
traefik_proxy.1.njo7mvjm87de@docker-desktop | time="2024-12-28T18:21:03Z" level=error msg="======> test log.Printf" plugin=plugin-jwt module=github.com/agilezebra/jwt-middleware
traefik_proxy.1.njo7mvjm87de@docker-desktop | time="2024-12-28T18:21:04Z" level=error msg="fetched openid-configuration from url:https://agilezebra.tech/.well-known/openid-configuration
" module=github.com/agilezebra/jwt-middleware plugin=plugin-jwt
I have included surrounding context so that it's clear that other DEBUG level messages are coming though from traefik itself.
Traefik version 2.11.18
Client:
Version: 27.4.0
API version: 1.47
Go version: go1.22.10
Git commit: bde2b89
Built: Sat Dec 7 10:35:43 2024
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.37.1 (178610)
Engine:
Version: 27.4.0
API version: 1.47 (minimum version 1.24)
Go version: go1.22.10
Git commit: 92a8393
Built: Sat Dec 7 10:38:33 2024
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.7.21
GitCommit: 472731909fa34bd7bc9c087e4c27943f9835f111
runc:
Version: 1.1.13
GitCommit: v1.1.13-0-g58aa920
docker-init:
Version: 0.19.0
GitCommit: de40ad0