Is there a way to do that?
That way I if I'm testing something, upon refresh be told what the log says without toggling to another browser tab.

Thanks!

Comments

carvalhar’s picture

Hi,

It's not possible with this module at this moment.
This module popus what is printed by drupal_set_message only. The Recent logs messages uses another function, watchdog, and doesn't print nothing at the page.

But this can be easily done. I liked the idea, but didn't test to implement it as a feature yet.
You'll need to add a hook to watchdog and print with drupal_set_mesaage the recent log message, something like:

jquery_msg_alert_watchdog(array $log_entry) {
  drupal_set_message($log_entry['message']);
}

Do you want to start it?

thanks,
carlos

SJourney’s picture

Sorry for the lapse in response. Not sure where to start mate. I quite a newb at this.

carvalhar’s picture

no problem ;)
just add the code above at the end of jquery_msg_alert.module

carvalhar’s picture

Status: Active » Fixed

ok. solved.

You only need to add:

function jquery_msg_alert_watchdog(array $log_entry) {
	$message = "";
	$message .= "<strong>".$log_entry['type'].": </strong>".$log_entry['message'];
  drupal_set_message($message);
}

at the end of jquery_msg_alert.module

I'm adding it to a new release.

SJourney’s picture

Wow, Great job!
Installed and testing.

There is one thing that I noticed that I was missing since installing this module; if there is an error that displays, it does so at the top of the page within a box. With module enabled, that is gone, and error appears in popup and then shortly disappears. How can one gain access to the error swiftly so that one could cut/paste it to d.o. for troubleshooting ?

carvalhar’s picture

easy!

Access this module settings page. There are 3 types of drupal messages. Uncheck error and keep only status and warnings.

Or edit the plugin settings and avoid it to close the alert, disabling the checkbox 'close after time expire' (i don't remember the exact sentence) or you can increase the time to close.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.