Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#431 closed defect (fixed)

Make celeryd load logging settings from paste.ini paste_local.ini

Reported by: joar Owned by:
Priority: major Milestone: 0.3.3
Component: programming Keywords:
Cc: Elrond Parent Tickets:

Description

Load logging settings from the paste(_local)?.ini configuration file.

Subtickets

Change History (12)

comment:1 Changed 11 years ago by Christopher Allan Webber

I thought "It would be easy to extend config_spec.ini to add the logging field", but looking at http://ask.github.com/celery/configuration.html#celeryd-log-file it looks like the one config option that existed for this has become deprecated? Strange.

comment:2 Changed 11 years ago by Christopher Allan Webber

Component: component1programming

comment:3 Changed 11 years ago by ShawnRisk

Owner: somebody deleted
Status: newassigned

comment:4 Changed 10 years ago by Elrond

Milestone: 0.3.3

I think, someone added some basic support for this. At least I vaguely remember.

We should reinvestigate, what we have, for 0.3.3.

comment:5 Changed 10 years ago by Christopher Allan Webber

We did get this for 0.3.2 but I am unhappy about it.

There are some fragile things about it... if you try to add multiple loggers separated by commas in the paste file, it breaks. That might be fixable, but...

I actually wonder if there's some chance we should be setting up the logger inside of mediagoblin.ini instead of paste.ini if we really want this. Additionally, really, mediagoblin should *not* be looking at paste.ini... in the ideal world paste deploy is more like apache/nginx and actually shouldn't *have* to be used, it should be possible to launch the mediagoblin wsgi application without paste at all. But maybe that's a silly desire, I don't know.

I'm kind of rambling; I think this needs to be thought through some more. It is implemented though, and so I'm not sure if this bug should be closed or not. Maybe the "debate" of a future solution deserves its own bug?

comment:6 Changed 10 years ago by Elrond

Just some quick notes:

For the normal mediagoblin process, paste itself does the logging setup. From paste*.ini. We don't have to do anything for that. We had that from a while back.

What this bug is about: Making celery parse the same info and use it the same way.

One problem: The current implementation is home made, while python logging has an official way to load config files (and paste just uses that I think). So we probably should rewrite our current solution to use the python loggong config loader?

comment:7 Changed 10 years ago by Christopher Allan Webber

If there's an official way to use the python logging config loader, that would be a huge improvement, and if someone can take over and do that, it would be most welcome.

I've also been wondering somewhat if we shouldn't be setting things up like logging and etc from mediagoblin directly, if it's detected that logging is not already set up, and thus encourage people to use mediagoblin's own logging setup if possible... we could possibly have some control over the way celery would do this also, then. But that also might mean more hacks that hook into the way celery is launched, or totally taking over the way celery is launched; I'm not sure.

That rambling aside, if someone can do what Elrond suggested re: official python logging way of doing things, I think that should be done, this should be closed out, and changing the way this works should move into a separate bug.

comment:8 Changed 10 years ago by Christopher Allan Webber

Milestone: 0.3.30.3.4

comment:9 Changed 10 years ago by Christopher Allan Webber

Was Elrond's statement done?

I'm willing to close out what I said here and accept this as done if so :)

comment:10 Changed 10 years ago by joar

Resolution: fixed
Status: newclosed

Celery now uses logging.config.fromFile to set up logging

comment:11 Changed 10 years ago by Elrond

I think this one was fixed before 0.3.3? So the milestone should be fixed?

comment:12 Changed 10 years ago by Elrond

Milestone: 0.4.00.3.3

This happened in 9d7c69fb74283d15589d8ed970d5b3bd1cfee2f0.
And improved in 86f0ff75e3538b45b23c251d3a7c31496fe8f39a.

Both look like being commited before 0.3.3, so I'm changing the milestone.

Note: See TracTickets for help on using tickets.