From b817479828e585ab6cc5c8a91e7d35ca1241cf03 Mon Sep 17 00:00:00 2001 From: "Alex Ellis (OpenFaaS Ltd)" Date: Fri, 18 Sep 2020 12:19:45 +0100 Subject: [PATCH] Document logs redirection Fixes: 106 Signed-off-by: Alex Ellis (OpenFaaS Ltd) --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index e349a1e..3ac6f8a 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,22 @@ journalctl -t openfaas-fn:figlet -f & echo logs | faas-cli invoke figlet ``` +### Logs for the core services + +Core services as defined in the docker-compose.yaml file are deployed as containers by faasd. + +View the logs for a component by giving its NAME: + +```bash +journalctl -t default:NAME + +journalctl -t default:gateway + +journalctl -t default:queue-worker +``` + +You can also use `-f` to follow the logs, or `--lines` to tail a number of lines, or `--since` to give a timeframe. + ### Exposing core services The OpenFaaS stack is made up of several core services including NATS and Prometheus. You can expose these through the `docker-compose.yaml` file located at `/var/lib/faasd`.