I’ve been trying to set up logging in Linux for one of my Edge drivers so that the log output is continuously saved to a file, but I’m running up against a flushing issue. No logging output (besides the initial ‘connecting’ and listening for logs’ messages) is written to the file until I Ctrl-c out of the CLI logging command:
st edge:drivers:logcat <driverId> --hub-address 192.168.1.101 >> logs/as_edge.log 2>&1
I’ve tried various remedies recommended in stackoverflow, such as using stdbuf, but nothing seems to work. I want to be able to run tail on it to monitor the file when needed, and also have a periodic log rotation process.
Is there anything I can do to address the flush problem or would that require a fix to the CLI itself?