FYI I'm done for today, but I'll try to debug it tomorrow (--namespace + --logto2 + --log-maxsize combination).
2014-04-05 18:07 GMT+02:00 Łukasz Mierzwa <[email protected]>: > I don't think this is the case, I do have log-backupname set and new log > file was created. > > > 2014-04-05 18:03 GMT+02:00 Łukasz Mierzwa <[email protected]>: > > So I shall write one ;P >> >> >> 2014-04-05 17:53 GMT+02:00 Roberto De Ioris <[email protected]>: >> >> >>> > Hi, >>> > >>> > I'm not sure if this is bug with logging or I simply failed to find the >>> > right combination of options. Right now I'm pushing logs from vassals >>> > using >>> > remote syslog plugin (localhost syslog over tcp), it works just fine. I >>> > wanted to switch to plain log files, each vassal would have rotated log >>> > file inside the namespace. >>> > >>> > If I use --logto I must pass full path including namespace path, >>> example: >>> > --logto=/ns/app1/home/uwsgi.log >>> > so I guess that logs are opened before jailing vassal. >>> > >>> > If I'll add --log-maxsize it doesn't work regardless if I set full >>> path, >>> > or >>> > just path inside the namespace. I think that uWSGI tries to call >>> rename() >>> > using full path as first arg, but we are inside the namespace so it >>> fails. >>> > >>> > So i tried using --logto2 - it would open logfile after dropping >>> > privileges, so it will happen inside my namespace. This works just >>> fine. >>> > >>> > So I've added --log-maxsize again, log is being rotated, but all writes >>> > are >>> > still going to rotated log, looks like it's not being reopened after >>> > rotating. I've checked with lsof and it turns out that master process >>> has >>> > new file opened, but all workers keep old file opened. >>> > I've tried adding --log-master, but it doesn't seem to have any >>> effect. >>> > >>> > Am I missing something with this setup? >>> > >>> >>> --logto2 seems the right approach to me, but the problem is here: >>> >>> https://github.com/unbit/uwsgi/blob/master/core/logging.c#L520 >>> >>> the filename checked is the one from --logto >>> >>> it should be an easy fix, i will wait for your patch ;) >>> >>> >>> >>> -- >>> Roberto De Ioris >>> http://unbit.it >>> _______________________________________________ >>> uWSGI mailing list >>> [email protected] >>> http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi >>> >> >> >> >> -- >> Łukasz Mierzwa >> > > > > -- > Łukasz Mierzwa > -- Łukasz Mierzwa
_______________________________________________ uWSGI mailing list [email protected] http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi
