how can we see the .exe printf message

104 views Asked by At

I have an question about the .exe log. I am using raspberry pi 4 module with Debian OS where I am running my c-program from the .service base auto-start .exe process. Which is running well So whenever raspberry Pi will restart my program will start automatic.That's fine but how do I see my print-f log from the terminal.

When I run exe with below line it will print the message but when this .exe running through the auto-services how can we check the log ?

Is there any linux command which will help to print run-time message. ?

root@raspberrypi: $./test.exe

1

There are 1 answers

0
umläute On

it seems that you are using a systemd service unit, to run your binary.

if so, you can use:

journalctl -u <name>.service

(replace <name> with the actual name of your service)

sidenote: do not use the .exe extension for your elf-binaries ("linux binaries"). .exe is an extension for PE32 files ("windows executables"), but Linux is perfectly capable of running a file with an arbitrary name (extensions have no meaning under linux).

so: executables typically have no extension at all, and you should get used to that: use test instead.