cancel
Showing results for 
Search instead for 
Did you mean: 

Disable logging per module

Disable logging per module

Feature request from mzeis, posted on GitHub Feb 12, 2015

Some extensions log useless stuff that pollutes the logs.

The problem could be avoided if Magento as well as the extension vendors would pay more attention to the log levels already provided and use them accordingly (e.g. differentiate between debug output and real information / notices / warnings / errors).

As it may not be possible to force using the correct log levels it would be nice to have an option in the System Configuration to disable logging. One of many possible ways to solve this in the UI would be to have a multi-select listing all modules in the installation.

(1)
14 Comments
apiuser
New Member

Comment from wsakaren, posted on GitHub Feb 14, 2015

Merchants are not going to use loggly. For our particular area they want it in the admin panel, or they want better verification when entering data. For instance when packing boxes they want to be able to switch on logging to view this. They will not want to go to Loggly, it will scare the hell out of them.

The reality we find is that merchants are involved at this level, and even a lot of the web devs do not have a clue about stuff. Make it simple.

Customers send us log files today, but they find it hard to do sometimes. We have screencasts that walk them thro the process. We have many many customers that either do not have access to their file system, or have no clue how to use it.

apiuser
New Member

Comment from orlangur, posted on GitHub Feb 16, 2015

@piotrekkaminski,

is it possible to automatically add current module name to all logs or this would have to be explicitly added to all log messages? This is actually pretty important to be able to analyze logs

It is possible with debug_backtrace hack or if each module will have separate logger instance, as suggested by @antonkril.

Is it not enough to have all messages in one log with ability to filter some of them? We can do it pretty accurate even with current log message format: just collect all possible log messages from all extensions (like we do for translations) and then for each message in UI specify which extension could add the message to log.

apiuser
New Member

Comment from CodeMonkey90, posted on GitHub Mar 09, 2015

@wsakaren I haven't checked how exactly M2 uses Monolog, but in theory, this should be really easy to do. Just add a custom Handler to the Monolog instance, which sends the logs to the admin panel, and you're done. Monolog can do everything you mentioned.

apiuser
New Member

Comment from devdesco-ceo, posted on GitHub Mar 02, 2016

How to completely disable debugging and writing anything to debug.log unless lets say I exclusively enable debug output from lets say FedEx Shipping extension?

Or may be change debug / syslog reporting level?