I don’t quite understand what you’re trying to achieve or are expecting to see with these commands. I ran journalctl –f and didn’t see any unusual behavior. Can you explain in more detail what behavior you describe as annoying, is something not working as it should?
when u define ur service as systemd service, u get at default the journal as output
so when u do
journalctl -fu daemon-name
u will get the stdout and stderr output to journal for a program running as daemon called daemon-name
so when u do now console.log('hello') in this i.e. nodejs daemon programm called daemon-name it should write hello and some more to the journal. but it does NOT.
Its working for all other descriptors but not journal.
its getting lost, only way to preserve it is to redirect is to systemlog, konsole, or custom log file. i.e.
... StandardOutput=syslog+console ...
Thanks for the explanation. However, I'm not sure if you already were able to find a solution by making the change with StandardOutput=syslog+console, or if you still need help with it. Do you need to make these changes permanent?
Let us know if there is anything else we can help you with.
offcourse i want a solution, i dont want to swarm syslog.
Its a bug and it was working in older image.
stdout and stderr should, like intended by systemd developers, go to journal at default not nowhere...dont u think?i suspect there is something wrong with the systemd config/socket.
What i do is a workaround, a hack, not a solution for productivity environment.
Would be nice if u could fix this bug, in future images at least
We’ll pass your request and workaround to the proper team. We just need to know in which image/images this was working as expected and in which image are you testing now that has the bug.
After doing some research and running some tests we were able to make some progress. We can verify that the service is writing to the journal. We were also able to direct the stdout to the journal by adding StandardOutput=journal and sys.stdout.flush() on the python script. This procedure might be beneficial for other users but writing stdout from a user program is not practical since it will make the journal size big. To monitor the journal use journalctl –f.
x = mraa.Gpio(13)
We hope you find this useful.