Allow vhost-specific PassengerLogFile
From watsonian on June 23, 2009 11:05:42
What steps will reproduce the problem?
- Force your application not to start (e.g., clear out your database.yml file).
- The (new as of 2.2.4) error message is written to the global apache error log.
What is the expected output? What do you see instead?
I would like to see an additional option for this error message and other application-specific error messages that are written to the global apache error log added that would let you specify a specific location for those errors to be written that's customizable for each vhost.
For example, specify that they're written to log/passenger.log in the application's directory. This would be extremely useful in shared hosting environments where users don't have access to the global apache log and as such can't see helpful debug output related to their application.
Perhaps something like a PassengerErrorLogLocation configuration option. All application-level exceptions would still get logged to environment.log, but any lower level errors with Passenger related to the particular application that generated it could be sent to another specific error log outside of the global apache log.
Original issue: http://code.google.com/p/phusion-passenger/issues/detail?id=323
From brewster1134 on September 24, 2009 16:57:38
most definitely necessary. i was troubleshooting in the dark for 4 days with no error to guide me. finally i had someone at DH look at the global log, and it was solved in minutes.
From dykema on February 12, 2010 16:09:47
This would be really useful. It keeps me from debugging my passenger app (django).
From bosdtf on May 09, 2010 06:12:25
this is really needed. Passenger should listen to error_log directive in httpd.conf
Since Passenger 4, it is possible to set PassengerDebugLogFile to have all such messages redirected to a specific file. However doing it on a per-vhost basis is "challenging", to say the least. There are a lot of messages which are important but don't belong to any particular vhost. Application spawning errors are actually encountered in the spawning thread, which runs in the background and is detached from any specific request.
However, it should be possible to have the stdout and stderr of apps redirected to a custom file. And it should also be possible to forward all non-vhost messages to all files. Maybe that would be an acceptable compromise.
Having said that, I don't consider it a high-priority item to work on.
That feature would be very usefull.
I think non-app reloated messages should still be logged to apache main log (or PassengerDebugLogFile if set) (not to disclose any information).
This new log option should be per-app I think, not per vhosts (multiple vhosts can point to same aplication). One possibility is to read PassengerDebugAppLogFile config from actual app folder like from file PassengerDebugAppLogFile.txt which can say "logs/passenger-app.log" Another is to take all PassengerDebugAppLogFile from apache vhosts and create pool of log files that take all app-related messages. Third option (and I think the best) is that passenger aplication log should be enabled by default and set hardcoded to log into logs/passenger-app.log (in app dir) I could be disabled by PassengerDebugAppLogFile = off in any of the apache vhosts pointing to that app. Also option to log app-errors to main apache log file (or PassengerDebugLogFile if set) and app log file at the same time should be usefull in some scenarios.
Also when writing to PassengerDebugAppLogFile passenger should check if it is not a symlink as it is popular atack method
Consider this one too if doing #1279.
Plesk now has NodeJS support built-in using Passenger. Lots of us found ourselves lacking some good log files for debugging. This is a priority enhanciment now.
Please consider doing this. I can see this has been opened 8 years ago.. so i'' not that confident something will happen but I have faith in you guys.
Cheers!
What's the reason for closing this issue? Was that some kind of a joke?
Ah sorry, i closed it thinking of https://github.com/phusion/passenger/issues/1279