Skip to content

step client's API call log #1264

Answered by maraino
himdeeppathak asked this question in General
Discussion options

You must be logged in to vote

We're considering replacing the log library that one that allows you to log everything. If you are specifically interested in viewing something specific, you can change the code to do something like this to your CA:

diff --git a/logging/handler.go b/logging/handler.go
index a8b77d60..e06c9e42 100644
--- a/logging/handler.go
+++ b/logging/handler.go
@@ -1,6 +1,9 @@
 package logging
 
 import (
+	"bytes"
+	"encoding/json"
+	"io"
 	"net"
 	"net/http"
 	"os"
@@ -47,11 +50,34 @@ func NewLoggerHandler(name string, logger *Logger, next http.Handler) http.Handl
 func (l *LoggerHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
 	t := time.Now()
 	rw := NewResponseLogger(w)
+	logBody(rw, r)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@himdeeppathak
Comment options

Comment options

You must be logged in to vote
1 reply
@himdeeppathak
Comment options

Answer selected by himdeeppathak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants