I’ve been trying to send messages to the resin.io logs in the resin.io dashboard page but unsuccessful.
I’ve tried from python using sys.stdout.write and sys.stderr.write.
i’ve tried echo “hello” > /dev/stdout
i’ve tried echo “hello” > /dev/stderr
i’ve tried echo “hello” > /proc/1/fd/1
init is enabled. and application is still running. i can see output in the terminal. except i want the output to be sent to dahsboard logs. i will paste the dockerfile here
FROM resin/raspberrypi3-buildpack-deps
# Enable systemd, as Resin requires this
ENV INITSYSTEM on
# Make the hardware type available as a runtime env var
ENV RESIN_ARCH armv7hf
ENV RESIN_MACHINE_NAME raspberrypi3
# Copy the build and run environment
COPY . /opt/ttn-gateway/
WORKDIR /opt/ttn-gateway/
# Build the gateway (or comment this out if debugging on-device)
RUN ./dev/build.sh && rm -rf ./dev
# Start it up
CMD ["sh", "-c", "./run.py"]
CMD while : ; do echo "idling ..."; sleep ${INTERVAL=600}; done
i’m sorry if i wasn’t clear. i’m running my script from the app container. i installed cron and want the output of the cron job to display in the resin.io dashboard.
Ah, yes. Resin’s logging only receives output from the command that’s run by the container, it can’t capture the output from every running process on the machine. If you separately open a terminal to the device and run commands, that’s totally independent. If you want to manually run commands and have those messages appear in the logs for the device, you’ll need to find a way to communicate with the command being run by your container, to have that command output them instead.