I have below issues with Express Gateway logs:
When I start the gateway with below command it shows debug logs, but the changes that I do in gateway.config.yml config will not reflect in debug log.
LOG_LEVEL=debug npm start
How do I add timestamp for the log entries?
Edited:
gateway.config.yml config values:
pipelines:
default:
apiEndpoints:
- api
policies:
- log: # policy name
- action: # array of condition/actions objects
#timestamp: true
message: Test ${req.method} ${req.originalUrl} # parameter for log action
# Uncomment
key-auth:when instructed to in the Getting Started guide.
- key-auth:
- proxy:
- action:
serviceEndpoint: httpbin
changeOrigin: true
Express Gateway has no way to store logs on files. While this is technically possible (We're using Winston under the hood so we would just need to put the right transport strategy) we haven't provided a way to enable it. Right now you'd need to catch the log from the standard output and save them somewhere, using IO redirection in case you're on an UNIX system.
I'm not quite sure what you mean here. When you're doing some changes to the gateway.config
file you should receive an info
message telling you the hot reloading has completed. If you can elaborate more I can be more precise here
Unfortunately you can't. Our logging strategy is not exactly THAT configurable. It might be worth to open an issue on our repository so we can prioritize these requests.
Thanks,
V.