From 1357311be7b4d5742e925ae18068327aed5ce109 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Sat, 29 Sep 2018 18:01:08 +0200 Subject: [PATCH] Add logging commands --- CHANGELOG.md | 1 + Makefile | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1522d8b..80ee735 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +- 2018-09-29 [Improvement] Add logging commands - 2018-09-29 [Improvement] Add self-documented help with "make help" - 2018-09-29 [Feature] Add [Portainer](https://portainer.io) as an optional web UI to administer docker containers - 2018-09-15 [Feature] Add student notes as an optional feature diff --git a/Makefile b/Makefile index 13c8c8f..e253fc6 100644 --- a/Makefile +++ b/Makefile @@ -123,6 +123,16 @@ info: ## Print some information about the current install, for debugging echo $$EDX_PLATFORM_PATH echo $$EDX_PLATFORM_SETTINGS + +#################### Logging + +logs: ## Print all logs from a service since it started. E.g: "make logs service=lms", "make logs service=nginx" + $(DOCKER_COMPOSE) logs $(service) +tail: ## Similar to "tail" on the logs of a service. E.g: "make tail service=lms", "make tail service=nginx" + $(DOCKER_COMPOSE) logs --tail=10 $(service) +tail-follow: ## Similar to "tail -f" on the logs of a service. E.g: "make tail-follow service=lms", "make tail-follow service=nginx" + $(DOCKER_COMPOSE) logs --tail=10 -f $(service) + #################### Docker image building & updating update: ## Download most recent images