Verbose log

Is it possible to enable verbose logging in production instance of Discourse self-hosting using Docker image without hacking a code?
I re-read many suggestions in this place but none of that worked or didn’t get any additional information.

I feel your pain - not that I’m aware of!

In the Chatbot plugin I can divert verbose Info logs (optionally via setting) to Warn in Production so I can see them. Kind of critical for visibility of AI issues.

1 Like

:slight_smile: … I saw your posts … my issues are connected with SAML plugin and even I know SAML and authentication protocols well I am not able to do anything without log, and it is look like the plugin doesn’t work at all (I did try even create ideal SAML response according to parameters in the plugin). I see lots of potential in Discourse, but installation, configuration, and especially logging is very weird (when I compare with GitLab which uses the same platform).

It is look like I will need to learn Ruby environment fast to solve the issues I have :slight_smile:

1 Like

Solve issue with SAML plugin :slight_smile: … it is an issue with plug-in not with omniauth or ruby-saml gem/library (I will try document what I did, but basically it is a combination of insufficient and misleading documentation, and some weird programming solutions, without proper debugging, some comment is add, but without issues system is hard to understand way).

To stay with topic I suggest to do follow (according to my limited knowledge of Discourse and Ruby):

  • manually edit container file (containers/app.yml)
  • hint: if you like that container have different name you may change filename in containers directory and do all command on the way to change app to <your_name> (probably that is possible to do on some other way, but I didn’t have time to investigate)
  • fork plugin in GitHub in your own space so you may manipulate with code, you may always call it in the same way like any other plugin from a container configuration file
  • in many places you may add just File.write('/var/www/discourse/log/production.log', 'Some text', mode: 'a') which will be written in log file everytime interpretation goes at that part of code
  • you may also fork Discourse project on GitHub and clon it from your place if you like to improve Discourse too
1 Like

That could work!

But if you want to stick with Rails I think this is a better option:

(until that is someone helps provide us with an info level option for production!)

Thanks for the additional option … my knowledge of Ruby/Rails isn’t enough to do such things :slight_smile: … I need to learn more to achieve your level of knowledge, I will try to improve SAML plugin in this way (hopefully soon), but now I need to finish the installation other SW on one pilot projects where Discourse is one of component.

1 Like