mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-06-02 07:40:48 +00:00
Merge pull request #275 from resin-io/update-dindctl-logs
Update `dindctl logs` to use journalctl now that we send logs there
This commit is contained in:
commit
e0b24560b7
@ -11,12 +11,6 @@ SUPERVISOR_IMAGE=${SUPERVISOR_IMAGE:-"registry.resindev.io/resin/${ARCH}-supervi
|
|||||||
PASSWORDLESS_DROPBEAR=${PASSWORDLESS_DROPBEAR:-"false"}
|
PASSWORDLESS_DROPBEAR=${PASSWORDLESS_DROPBEAR:-"false"}
|
||||||
SUPERVISOR_EXTRA_MOUNTS=
|
SUPERVISOR_EXTRA_MOUNTS=
|
||||||
|
|
||||||
SUPERVISOR_LOGS=(
|
|
||||||
'/var/log/supervisor-log/go_supervisor_stdout.log'
|
|
||||||
'/var/log/supervisor-log/resin_supervisor_stdout.log'
|
|
||||||
'/var/log/supervisor-log/supervisor/supervisord.log'
|
|
||||||
)
|
|
||||||
|
|
||||||
function showHelp {
|
function showHelp {
|
||||||
echo
|
echo
|
||||||
echo " This script can be used to facilitate supervisor development. Its core feature is allowing"
|
echo " This script can be used to facilitate supervisor development. Its core feature is allowing"
|
||||||
@ -82,14 +76,7 @@ function runDind {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function logs {
|
function logs {
|
||||||
if [ "$1" = "-f" ]; then
|
docker exec -ti resin_supervisor_1 journalctl $@
|
||||||
docker exec -ti resin_supervisor_1 tail -f ${SUPERVISOR_LOGS[@]}
|
|
||||||
else
|
|
||||||
for log in "${SUPERVISOR_LOGS[@]}"; do
|
|
||||||
echo " == ${log} =="
|
|
||||||
docker exec -ti resin_supervisor_1 cat "$log"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
action="$1"
|
action="$1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user