joeguilmette / wp-local-toolbox

A simple plugin to set different defaults for local, staging and production servers.
GNU General Public License v3.0
78 stars 13 forks source link

Control DEBUG log Verbosity #8

Open jb510 opened 9 years ago

jb510 commented 9 years ago

Interesting idea in AWP that might apply here. Using an mu-plugin to control error log verbosity. So on "production" you could keep WP_DEBUG on, but only log fatals for example

http://wordpress.stackexchange.com/a/103043/2932

Just an idea... I'll play with it later.

jb510 commented 9 years ago

From @jdevalk : https://gist.github.com/jdevalk/279c2564ecf72e28f11c

joeguilmette commented 9 years ago

Well that looks pretty dead simple.

It'd be nice if we could get it down to two constants - one to toggle it on/off and another optional one to change the log file path. On mobile, so I can't do much research.

Found this, may or may not be relevant: http://wordpress.stackexchange.com/questions/47123/how-to-define-wp-debug-as-true-outside-of-wp-config-php

joeguilmette commented 9 years ago

What about hooking this up to WPLT_NOTIFY so you could receive notifications of a fatal in production?