Commit Graph

14 Commits

Author SHA1 Message Date
Guangming Wang 952437ebe3 cleanup: fix some typos in code comment
Signed-off-by: Guangming Wang <guangming.wang@daocloud.io>
2019-08-21 09:24:37 -04:00
Patrick East 0ed56fef03 Change to using custom text log formatter
This is less sophisticated than the default logrus one, but it is
much easier to read the server output. Primarily with JSON fields
and multi-line strings. They are decoded and prettified.

Signed-off-by: Patrick East <east.patrick@gmail.com>
2019-05-10 12:04:56 -07:00
Stephan Renatus 161722214d logging: log escaped path
Signed-off-by: Stephan Renatus <srenatus@chef.io>
2018-04-12 16:37:08 -07:00
Torin Sandall 38871c87d0 Revendoring logrus to deal with rename
See https://github.com/sirupsen/logrus/issues/570#issuecomment-313933276 for more info.
2017-08-24 09:32:55 -07:00
Matthew Mussomele 4435880658 Implement watch API in the server 2017-07-20 17:07:51 -07:00
Torin Sandall 54d9193662 Improve OPA logging
This changes how OPA logs API requests and responses.

Before:
- OPA would not log at level.Info
- OPA would log request header and body and response header (but not
  body) at level.Debug.

After:
- OPA logs request and response headers at level.Info
- OPA includes request and response body at level.Debug.
2017-05-15 17:20:03 -07:00
Torin Sandall 7d7d2912ae Replace glog with logrus 2017-03-12 12:04:35 -07:00
Torin Sandall 0e39da4664 Improve request logging
Use httputil.DumpRequest as this is much cleaner than previous approach
and handles all requests (instead of just /data). With new approach we
can get rid of getInputParam and related tests.

Also, move slack link around.

Fixes #281
2017-02-28 17:14:41 -08:00
Torin Sandall 68fe788626 Split server types into separate package
This will let them be re-used by other sub-packages such as the
authorizer.
2017-02-22 14:49:21 -08:00
Torin Sandall ebc753cfd8 Rename the request document
Naming is hard. The "request" document is now the "input" document.
2017-01-18 16:37:32 -08:00
Torin Sandall 5ba261a6d8 Fix empty request parameter parsing
Return an error if the request parameter is empty. This indicates an error in
the caller.

Fixes #212
2017-01-17 13:32:56 -08:00
Torin Sandall 333bf4fb1e Update runtime with request changes 2016-12-19 09:59:04 -08:00
Torin Sandall d83f39a0d0 Suppress globals in HTTP access logs
Callers currently provide globals as query parameters. Because the query
params are often JSON values, they need to be escaped. This results in the
access logs being very noisy.

This change removes the "global" query params from the access logs at
V(2) and pretty prints them on a separate line at V(3).
2016-09-22 10:36:53 -07:00
Torin Sandall 12e299fdf2 Add basic access logs
Wrap the router so to capture response latency and implement an interceptor
that captures status codes and number of bytes written. Log the information
once the inner route completes.
2016-05-14 10:44:02 -07:00