Last active
April 9, 2021 11:57
-
-
Save Frechet/2b8562a376a6f6b8cdaf63c88073fc08 to your computer and use it in GitHub Desktop.
Change docker logs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| docker exec -it container-name bash | |
| apt update | |
| apt install zip mc nano | |
| unzip app.war | |
| nano ./WEB-INF/classes/logback.xml | |
| # через mc удаляем файл из war и подкладываем новый | |
| # выходим и рестартуем контейнер | |
| docker logs container-name -f --tail=100 | |
| # или грепом | |
| docker logs nginx 2>&1 | grep "ERROR" | |
| # или собрать в файл и смотреть лесом | |
| docker logs nginx 2>&1>out.txt | |
| less out.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment