emails not generating
-
I have not been receiving emails for errors. I installed WP Mail Logging plugin and nothing is being generated.
-
and at that, nothing is sent or logged until I reload the bashboard with the widget
WP Engine recommended this plugin, are there incompatibilities?
The widget changes when you enable
WP_DEBUG/WP_DEBUG_LOG? I don’t think I’ve seen that before and it’s certainly not an intended feature. Could you maybe post a screenshot?and at that, nothing is sent or logged until I reload the bashboard with the widget
This is unusual, but it can theoretically happen if the site in question doesn’t get a lot of visitors. WordPress Cron can only trigger if someone is browsing the site. If there’s no-one else on the site, it will only trigger when you load or refresh a page.
WP Engine recommended this plugin, are there incompatibilities?
Not that I know of, no. Of course, there’s always a chance that there’s a compatibility issue that hasn’t been discovered or reported yet.
The timestamps seem fine and the plugin should be able to parse them. I’ll see if I can add some more logging later. It could help figure out if it’s just not seeing the log entries or if they’re getting skipped for some reason.
Ah interesting, so the error will trigger when someone loads the page, but will not log or email until another page is loaded or reloaded? Weird, but at least it’s explainable.
This is what the widget looks like when
WP_DEBUG_LOGistrueThis is what it looks like when it is
falseThank you for the screenshots. It looks like there are actually two different log files: one that’s used when
WP_DEBUG_LOGis enabled and another one that’s used by default (it’s probably specified somewhere in the overall PHP configuration). The plugin should show the current log file name at the bottom of the widget.In this case, the second log file – the file that’s used when
WP_DEBUG_LOGis set tofalse– appears to use a timestamp format that the plugin might not be able to parse. This could prevent it from sending email notifications.Try this: enable
WP_DEBUG_LOGand then trigger a couple of errors again. KeepWP_DEBUG_LOGenabled until the cron job has run twice and see if any email notifications shows up.If that works, you could keep
WP_DEBUG_LOGenabled permanently. Alternatively, if you don’t want to use that setting, you could set up a custom log file for that WP site. Let me know if that’s what you want to do.Yes, when
WP_DEBUG_LOGis enabled, everything works as expected. The only problem is that I don’t see a way to limit the size of the log, and I can’t have 1000+ sites running amok with massive log files.The plugin currently doesn’t have a way to automatically clear or truncate the log, but it can send you an email notification when the file size exceeds a certain threshold. You can enable this feature in the widget configuration.
Maybe you could use
logrotateto periodically clear the log? It looks like a fairly flexible tool. I haven’t tried it myself though.
The topic ‘emails not generating’ is closed to new replies.