Replies: 1 comment 2 replies
-
I think a shared log is by design, and the t/mojolicious/embedded_lite_app.t test reflects that as well. From the Mount Synopsis: In your hypnotoad app:
Alternatively, you could make your own Mount plugin that sets the log path as you want, for example:
After all, per the Mount Description:
Both methods will cause all app->log references within a mounted app to log to the specific app-specific log file. This is not enough for the default helper |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We have several small webapps that don't see much traffic. Thought it might be an idea to serve them all under one hyptotoad as mounted/embedded apps.
This seems to be working just fine. Just one issue:
I'd like to have each mounted app log to their own separate log file. For my standalone HT installations I just use
crude, but it works just fine.
Inside
Mojolicious::Plugin::Mount
we seeso the
log
obj is being passed on from the parent app.The earlier trick above seems to replace the log obj inside the
startup
method of the mounted app, but not in one of its controllers. I tried dumping the log-obj one hashandle = stderr
,startup
haspath
setting.Any ideas for properly replacing the log obj inside each mounted apps?
(if relevant all tests have been made using
hyptotoad -f
, so no testing having it run under systemd)Beta Was this translation helpful? Give feedback.
All reactions