Logging options and 2 apps running in Trinidad

48 views
Skip to first unread message

Topping Bowers

unread,
Jul 18, 2012, 3:02:45 PM7/18/12
to rails-t...@googlegroups.com
Hi,

So we recently switched to running two apps side-by-side in trindad using the web_apps and hosts config options.  This seems to be working great, can use restart.txt and rolling builds to restart each app independently, etc.

We use SyslogLogger in both apps with tags (rails apps)... looks like this:

config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new("[amicus-homepage]"))

and

config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new("[brief]"))

When they boot - they are both logging to the correct syslogs (tagged correctly).  However on first request the homepage app starts logging with the tag "[brief]"  I'm confused at how this is possible since they are isolated in different runtimes right?

Is Trinidad passing in logging some how?

Thanks for any help or pointers on where to look.

Topper

Topping Bowers

unread,
Jul 19, 2012, 3:45:37 PM7/19/12
to rails-t...@googlegroups.com
Ha... so this is not a Trinidad thing but a unix/jvm/syslog thing.  Basically - your *process* can only have one open connection to syslog so you stomp on it for the entire process (the whole JVM).  For the curious... you can see that in action here: https://gist.github.com/3146102

Topper
Reply all
Reply to author
Forward
0 new messages