18
votes
Where to ask Tildes dev questions?
If I have a quick Tildes dev question, where should I ask it?
For an example that is not actually just an example, but the actual question which drove me to post, where can I found logging output? Specifically, if I want to print out something every time a request comes in, how should I do so?
Regarding your example, the Pyramid debug toolbar should be available where you can inspect a lot of stuff like requests, responses, SQL queries, etc.
It looks like the docs link is broken so here's the correct one.
Thanks, I just got the toolbar working, and it does indeed have a lot of information. However, I don't see the output of my logging statement anywhere. I've added a
logging.info("hello")
to theget_group_topics
function, which I believe gets run every time a request is made for the home page. I see there is a "Logging" tab in the Pyramid debug toolbar, but it is disabled for me.I suppose logging doesn't get written to disk anywhere?
I think the default log level is set too low for
info
to appear. I just did the same thing but withlogging.error
andlogging.warn
and they do appear in the Logging section of the debug toolbar.I'm not sure how to change the log level, I think it's in
alembic.ini
but when I set any of the levels there tolevel = NOTSET
orlevel = DEBUG
the info logs still aren't coming through. @Deimos, what am I missing?It wouldn't be in
alembic.ini
, Alembic is the library that handles database migrations (adding new tables/columns, etc.). The way it's described in the Pyramid debugtoolbar docs is a little weird, but it looks like you'd probably configure it as described here: https://docs.pylonsproject.org/projects/pyramid_debugtoolbar/en/latest/#disable-squashed-exception-informationSo that would probably be a couple of new sections to add to
development.ini
.(@danwoz)
Aha, I've got it. After a bunch of Python
hieroglyphics decodingexception reading I managed to figure it out, you have to add the whole spiel to get it logging. Adding the following sections todevelopment.ini
gets info logs into the debug toolbar. It also makes the logs show up injournalctl -f
.It may require a
vagrant ssh --command "sudo systemctl restart gunicorn.socket"
to get it to apply though, I don't thinkdevelopment.ini
changes are automatically reloaded.Nice work @Bauke! I'll give this a shot tonight.
logging.error
did the trick. Thanks!Development on Tildes or on some other computer system?
If it's about Tildes, then ~tildes is the right group for your question.
If it's about some other computer system or software or programming language, then ~comp is the best group for your question.
Ah, sorry I wasn't clear. It's development for Tildes.
I've edited the title of your topic accordingly.