Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Per-application log files for Apache/Nginx integration mode #1279

Closed
FooBarWidget opened this issue Sep 13, 2014 · 80 comments

Comments

Projects
None yet
@FooBarWidget
Copy link
Member

commented Sep 13, 2014

Currently, all application stdout and stderr output is redirected to a single log file. Lately there seems to be more interest among users - in particular Node.js users - to have per-application log files.

We're considering adding this feature. If you'd like to see the feature too, please vote for it here. Note that we weight votes from Enterprise customers more heavily, so if you're an Enterprise customer please mention that here.

Edit: If working on this also see the (probably outdated) patch in #260.

@kiranos

This comment has been minimized.

Copy link

commented Sep 14, 2014

+1

3 similar comments
@ceecko

This comment has been minimized.

Copy link

commented Sep 14, 2014

+1

@rmldsky

This comment has been minimized.

Copy link

commented Sep 17, 2014

👍

@filiphaftek

This comment has been minimized.

Copy link

commented Sep 17, 2014

+1

@weyert

This comment has been minimized.

Copy link

commented Sep 18, 2014

+1 This would be a great addition!

@muluc

This comment has been minimized.

Copy link

commented Sep 18, 2014

+1 :P

@piotr-sokolowski

This comment has been minimized.

Copy link

commented Sep 19, 2014

+1

@paulRbr

This comment has been minimized.

Copy link
Contributor

commented Sep 26, 2014

That's a great idea, and we would love to see this feature bein added to Passenger. Thanks! 👍 +1

@sebgie

This comment has been minimized.

Copy link

commented Oct 3, 2014

+1

8 similar comments
@edy

This comment has been minimized.

Copy link

commented Oct 3, 2014

+1

@kszarek

This comment has been minimized.

Copy link

commented Oct 21, 2014

+1

@trevvvy

This comment has been minimized.

Copy link

commented Oct 21, 2014

+1

@imerr

This comment has been minimized.

Copy link

commented Oct 23, 2014

+1

@sobolk

This comment has been minimized.

Copy link

commented Nov 7, 2014

+1

@PhilWaldmann

This comment has been minimized.

Copy link

commented Nov 12, 2014

+1

@Ginja

This comment has been minimized.

Copy link

commented Nov 24, 2014

+1

@gerwinbrunner

This comment has been minimized.

Copy link

commented Dec 3, 2014

+1

@trevvvy

This comment has been minimized.

Copy link

commented Dec 3, 2014

I think this has been addressed in the upcoming raptor release.

@FooBarWidget

This comment has been minimized.

Copy link
Member Author

commented Dec 3, 2014

It hasn't. It is not implemented yet.

@FooBarWidget

This comment has been minimized.

Copy link
Member Author

commented Dec 3, 2014

Unless you count the standalone mode. In the standalone mode you run a different Passenger instance per app, and so you have individual log files. But if you use the Nginx integration mode or the Apache integration mode, then that cannot separate log files per app yet.

@matthooks

This comment has been minimized.

Copy link

commented Dec 4, 2014

+1 to this, it's really weird to get all of my Rails stdout in the nginx error.log...

@BugRoger

This comment has been minimized.

Copy link

commented Dec 11, 2014

+1

1 similar comment
@devoll

This comment has been minimized.

Copy link

commented Dec 22, 2014

+1

@forkfork

This comment has been minimized.

Copy link

commented Jan 21, 2015

+1 (enterprise customer)

@roy

This comment has been minimized.

Copy link

commented Jan 21, 2015

+1

@jmscholen

This comment has been minimized.

Copy link

commented Jan 23, 2015

+1, enterprise.

@saadtazi

This comment has been minimized.

Copy link

commented Feb 7, 2015

+1

1 similar comment
@aletourneau

This comment has been minimized.

Copy link

commented Feb 13, 2015

+1

@OnixGH

This comment has been minimized.

Copy link
Contributor

commented Dec 20, 2016

@msva are you not able to use a logging framework?

@EduardJS

This comment has been minimized.

Copy link

commented Dec 20, 2016

@OnixGH We're sorry, we ain't that smart as you are. cough

@OnixGH

This comment has been minimized.

Copy link
Contributor

commented Dec 20, 2016

@EduardJS what do you mean? I wasn't being sarcastic, I just wonder why using a logging framework isn't a good workaround, since they are generally recommended anyway, as well as dedicated to this purpose (so probably offer more flexibility)?

I can understand the case that it would be a great thing to have available "by default" (through Passenger), so you don't have to use anything else for the simple logging needs, but it somehow seems like @msva is blocked by not having it so I'm interested in why a logging framework (apparently?) isn't an option.

Anyway keep it nice please..

@OnixGH OnixGH changed the title Per-application log files Per-application log files for Apache/Nginx integration mode Dec 20, 2016

@msva

This comment has been minimized.

Copy link

commented Dec 20, 2016

@OnixGH

This comment has been minimized.

Copy link
Contributor

commented Dec 20, 2016

@msva we need to take into account that Passenger is also used with Apache as well as in reverse proxy setups. I don't see anything about node in this thread, but can you say something about your own use case? People in this thread are asking for different things (which are not always compatible) so it's most valuable to know the use cases.

Btw. last month I tried something that might be relatively easy to implement, in line with what @wyardley suggested. We could prefix the app's stdout/stderr logging with application group name like in the example below (/home/test/apps/nodejs/simple/public (development)). By default that's the full path + environment, but you can already configure group names to something custom if you want to shorten.

=============== Phusion Passenger Standalone web server started ===============
PID file: /home/test/apps/nodejs/simple/passenger.3000.pid
Log file: /home/test/apps/nodejs/simple/passenger.3000.log
Environment: development
Accessible via: http://0.0.0.0:3000/

You can stop Phusion Passenger Standalone by pressing Ctrl-C.
Problems? Check https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
===============================================================================
[ 2016-11-10 12:16:45.7121 9348/7f0609c59780 age/Cor/CoreMain.cpp:817 ]: Passenger core online, PID 9348
App 885 /home/test/apps/nodejs/simple/public (development) stdout: 
App 885 /home/test/apps/nodejs/simple/public (development) stdout: Simple app listening on port 2000!
App 885 /home/test/apps/nodejs/simple/public (development) stdout: GOT REQUEST
App 885 /home/test/apps/nodejs/simple/public (development) stdout: { connection: 'close',
App 885 /home/test/apps/nodejs/simple/public (development) stdout:   host: '0.0.0.0',
App 885 /home/test/apps/nodejs/simple/public (development) stdout:   'x-forwarded-for': '127.0.0.1',
App 885 /home/test/apps/nodejs/simple/public (development) stdout:   '!~passenger-client-address': '127.0.0.1' }

This would allow for per-(spawned)-application logs with a simple tailgrep (which could for example be started / stopped automatically using the attached_process / detached_process hooks.

@wyardley

This comment has been minimized.

Copy link

commented Dec 21, 2016

FWIW, we mostly just use Winston + syslog transport with node projects that we run through Passenger (though I'd still love to see a more elegant fix for this problem as well).

@Wardrop

This comment has been minimized.

Copy link

commented Jan 25, 2017

+1 I've been wanting this for a long time.

@vaivars

This comment has been minimized.

Copy link

commented Feb 13, 2017

+1

As for the requests for "unified" with nginx directives - i think that isn't necessary if atleast the current passenger_log directive would instead of being global - be app specific would be enough.

@CamJN CamJN removed the SupportCentral label Aug 3, 2017

@msva

This comment has been minimized.

Copy link

commented Sep 5, 2017

Is it any progress?

The issue has been reported 3 years ago, and it has [Priority/High] and [EnterpriseCustomer] tags for 1.5 years already, but looks like still not fixed in any way 😿

P.S. @OnixGH, mostly, people (including me) just want that passenger either obey nginx access_log/error_log directives, or had the possibility to set passenger_log on per-server{} and per-location{} level.
So, each application will use separated logs without tons of kludges from user side (global passenger troubles can still go to the per-http{} log).

@OnixGH

This comment has been minimized.

Copy link
Contributor

commented Sep 5, 2017

@msva I know it's not what you want to hear, but we don't consider it something that is broken, especially not since there are workarounds to achieve per-application log separation through additional tools (logging libraries, parse/forwarders,, etc.).

We did recently spend some rewriting effort in the logging department to make some parts easier (leading to a bonus of supporting log level display), but the core of the matter is that log separation is not something that is easy to realize (which is probably also why, despite the apparent popularity, we also haven't really gotten any patch submissions :( ).

I keep the Prio label on to make sure it has our (continued) attention (and it certainly does), but I also want to be clear that there is no roadmap for this feature at this time, We are hiring though to further expand what we can spend on Passenger :).

@OnixGH

This comment has been minimized.

Copy link
Contributor

commented Apr 4, 2018

This feature is now available in the Fuse Panel.

@iDoMeteor

This comment has been minimized.

Copy link

commented Apr 4, 2018

@CamJN CamJN removed the SupportCentral label Apr 13, 2018

@OnixGH OnixGH added this to the 5.3.0 milestone May 9, 2018

@OnixGH

This comment has been minimized.

Copy link
Contributor

commented May 9, 2018

And also added to Passenger 5.3.0 (Enterprise).

@OnixGH OnixGH closed this May 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.