Forums

How does pythonanywhere configure log files after deployment?

I'm undergoing the process of setting up a more advanced logging configuration for my Django web server project. I want to add custom formatting for each independent log in my server and I'm wondering how I can target each of these since I believe I need each logger's name and not the filename, specifically.

The log files in question can be found on these paths from the Web tab. I dont really want to publicize my domain name, so I've replaced it with domain

Access log:domain.access.log

Error log::domain..error.log

Server log::domain..server.log

Right now I am using django-structlog middleware for configuring the server-side logging. The simple example here gets you started. What should the target names of each of these loggers be? Does pythonanywhere do anything funky I should know about, such as taking a root logger and piping it to different logs automatically? How can I configure each of those server side logs?

We do not configure any log files - output sent to stderr appears in your error log and the server log and access log are logs that are generated by the server software that is running your web app.