This documentation website doesn’t support Internet Explorer. Please visit our old documentation to find what you’re looking for.
Relevant selection for this article:
Passenger logs all its messages to a log file. Inside this log file you will find informational messages, errors, warnings and debugging messages generated by Passenger, as well as application output. Whenever Passenger wants to tell you something, it is done through this log file, so you should check this file whenever you suspect that something is wrong.
This guide teaches you where to find the log file, how to customize its location and verbosity, and teaches you other miscellaneous things that you should know.
Table of contents
Location of the log file
The default log file is located in
XXX is the port number that Passenger listens on.
Or, if you passed the
--log-file / "log_file" configuration, then the log file is in the referenced file.
Application output logging
Stdout and stderr
Everything that the application writes to the stdout and stderr channels is logged to the log file at log level 3 (the default log level for Passenger).
The application or web framework may have its own log file that is independent from the Passenger log file. You should also check that file to see whether your application or web framework has logged any important messages.
For example, Ruby on Rails logs to
log/production.log. When an error occurs during request handling, it is typically logged here. Note that this file does not contain errors that Rails encounters during startup – those kinds of errors are typically written to stderr, which means they end up in the Passenger log instead.
Note that Passenger runs applications in the "production" environment by default (that is, Passenger sets
NODE_ENV and related environment variables "production"). So if you're using Rails, please be sure to check
production.log instead of
Customizing the log file
You can instruct Passenger to log to a specific log using the passenger_log_file option.
By default, Passenger only prints important informational messages, warnings and errors. You can configure Passenger to log less important messages too, such as debugging messages, through
--log-level / "log_level".
Troubleshooting logging problems
Specifying /dev/stdout or /dev/stderr instead of a file doesn't work
Passenger Standalone supports using /dev/stdout and /dev/stderr since version 5.0.29, using the regular standalone options. Using other ways to configure these paths, for example via the Nginx configuration template, are not supported at this time.
Application stdout/stderr problems
Are you expecting to find application output in the log file, but don't actually see it? Then the cause may be that the application has modified stdout and stderr. Learn more about this.
Try raising the log level
Sometimes there's actually nothing wrong with the log file. Try raising the log level so that you see more messages.