简体   繁体   English

使用uWSGI emperor模式分离附庸日志记录

[英]Separate vassal logging with uWSGI emperor mode

I'm running uWSGI 1.9.17 in emperor mode (with the default config from Trusty's uwsgi-emperor package), and the emperor's logs are piping into /var/log/uwsgi/emperor.log. 我在emperor模式下运行uWSGI 1.9.17(使用来自Trusty的uwsgi-emperor包的默认配置),并且皇帝的日志正在流入/var/log/uwsgi/emperor.log。

The emperor.log file also contains all the stdout/err combined from each vassal, and I can't seem to get any of the vassals to log to a separate file. emperor.log文件还包含从每个vassal组合的所有stdout / err,我似乎无法让任何vassal登录到单独的文件。 I've tried using the logto = /var/uwsgi/apps/vassal1.log config options but to no avail. 我尝试过使用logto = /var/uwsgi/apps/vassal1.log配置选项,但无济于事。

Does anyone have any idea how to get the vassals logging to separate files? 有谁知道如何让封臣登录到单独的文件?

To separate vassal logs from emperor, you can use logger: 要将附庸日志与emperor分开,您可以使用logger:

logger = file:/var/uwsgi/apps/vassal1.log

I'm not sure why logto doesn't work on vassals, but loggers works fine. 我不确定为什么logto不适用于附庸,但记录器工作正常。 You can even specify what should be logged to what file (or by using other plugins, not only to file). 您甚至可以指定应记录到哪个文件(或使用其他插件,而不仅仅是文件)。 More on loggers you can find here 有关伐木工的更多信息,请点击此处

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM