OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • Logging and debugging in development?
« previous next »
  • Print
Pages: [1]

Author Topic: Logging and debugging in development?  (Read 3685 times)

ndejong

  • Newbie
  • *
  • Posts: 18
  • Karma: 0
    • View Profile
Logging and debugging in development?
« on: July 30, 2017, 02:57:20 pm »
I'm working on putting together an OPNsense plugin at the moment and have run into what would otherwise seem like a trivial problem to resolve if I could observe what the OPNsense web-app framework is doing under the covers.

I've tried switching debug=true in opnsense/mvc/app/config/config.php but I can't really see where the debug or logging messages are going or where to find them.

Could anyone point me in the right direction?
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 17703
  • Karma: 1615
    • View Profile
Re: Logging and debugging in development?
« Reply #1 on: July 31, 2017, 08:49:46 am »
Hi there,

I have to admit I never used that debug setting...

MVC debugging can be a bit tricky as there are multiple layers that can fail and there is no single log that will let you see it all.

Normally, /tmp/PHP_errors.log is the one to look for warnings / errors from the code itself.

A browser debug console is also helpful to inspect the API requests from the page.

Configd backend requests are logged in the system log (System: Log File), also from the console:

# clog /var/log/system.log

What specific error are you looking at? More details will certainly help to help more.


Cheers,
Franco
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Development and Code Review (Moderator: fabian) »
  • Logging and debugging in development?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2024 All rights reserved
  • SMF 2.0.19 | SMF © 2021, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2