logging information in modwsgi/tg2 in multi-processes environment?

View: New views
1 Messages — Rating Filter:   Alert me  

logging information in modwsgi/tg2 in multi-processes environment?

by Lukasz Szybalski :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello,
I have a production app setup and deployed via modwsgi with 3
processes and 10 threads.

I would like to log a search query that user does to a file instead of
database. What would be the safest way to do that considering the
website might be accessed ~100 times simultaneously?

I assume it would have to be something similar to logging module, and
file needs to be opened when the app starts? How will the "file open"
be managed if there are 3 processes + 10 threads each trying to open
the file at the same time? or I don't have to worry about that? Are
there any race conditions on append? How would I setup a this process
so that filename is "search_query_todaysdate.txt"
(search_query_20091105.txt)?


Any links on that?

Thanks,
Lucas



--
Automotive Recall Database - See if you vehicle has a recall
http://lucasmanual.com/recall

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to turbogears@...
To unsubscribe from this group, send email to turbogears+unsubscribe@...
For more options, visit this group at http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---