I am currently working on implementing my own UNIX shell in C. The basis of the shell is working, you could find the source code here.
Right now my next task is to implement a logging feature for the shell. So here's my question:
What are the UNIX/Linux best practices to do that? The simple way would be to open a file and write to it every time. But I was wondering if there is a function that would take care of that for me, helping me produce ... "cleaner"... code.
Thank you in advance for your help, I'm quite new to programming, but I want to do things right.
PS: If you have any general remarks about the rest of the code, they'd be greatly appreciated :-)