I am not talking about error logging but about debug logging.
for example, sending to the log file comments or a database query before it is sent to the database...
maybe I could utilize the error log for that, but I would like to keep them separate.
Also, assuming I know what operating system I am on, how can I make sure I have permission to write to a file?
I want the logs to be generated no matter where the application is deployed. This means that the file structure on which the application resides may be different from one deployment to another. How can I trust that a certain file or file directory will exist?