You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Offer unlimited log buffer size when scanning handler logs
Some users have complained that they cannot log lines longer
than 16KB. A 16KB log line seems excessive, but this has been
requested at least 2-3 times over the years.
To enable the feature, set log_buffer_size to -1. This is not
a default, because it is not as efficient as using a pre-
determined buffer size.
Tested by running curl with --data-binary and sending a 6.7M
Go binary into a function with the 16KB maximum log line size
set. That produced the error, when the size was set to -1, the
output was written, albeit quite slowly.
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
Copy file name to clipboardexpand all lines: README.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -201,7 +201,7 @@ Environmental variables:
201
201
|`jwt_auth`| For OpenFaaS for Enterprises customers only. When set to `true`, the watchdog will require a JWT token to be passed as a Bearer token in the Authorization header. This token can only be obtained through the OpenFaaS gateway using a token exchange using the `http://gateway.openfaas:8080` address as the authority. |
202
202
|`jwt_auth_debug`| Print out debug messages from the JWT authentication process (OpenFaaS for Enterprises only). |
203
203
|`jwt_auth_local`| When set to `true`, the watchdog will attempt to validate the JWT token using a port-forwarded or local gateway running at `http://127.0.0.1:8080` instead of attempting to reach it via an in-cluster service name (OpenFaaS for Enterprises only). |
204
-
|`log_buffer_size`| The amount of bytes to read from stderr/stdout for log lines. When exceeded, the user will see an "bufio.Scanner: token too long" error. The default value is `bufio.MaxScanTokenSize`|
204
+
|`log_buffer_size`| The amount of bytes to read from stderr/stdout for log lines. When exceeded, the user will see an "bufio.Scanner: token too long" error. The default value is `bufio.MaxScanTokenSize`. To turn off buffering for unlimited log line lengths, set this value to `-1` and `bufio.Reader` will be used which does not allocate a buffer.|
205
205
|`log_call_id`| In HTTP mode, when printing a response code, content-length and timing, include the X-Call-Id header at the end of the line in brackets i.e. `[079d9ff9-d7b7-4e37-b195-5ad520e6f797]` or `[none]` when it's empty. Default: `false`|
206
206
|`max_inflight`| Limit the maximum number of requests in flight, and return a HTTP status 429 when exceeded |
207
207
|`mode`| The mode which of-watchdog operates in, Default `streaming`[see doc](#3-streaming-fork-modestreaming---default). Options are [http](#1-http-modehttp), [serialising fork](#2-serializing-fork-modeserializing), [streaming fork](#3-streaming-fork-modestreaming---default), [static](#4-static-modestatic)|
0 commit comments