diff --git a/watchdog_console_log.module b/watchdog_console_log.module
index a2630b7..4757b55 100644
--- a/watchdog_console_log.module
+++ b/watchdog_console_log.module
@@ -51,7 +51,10 @@ function watchdog_console_log_watchdog(array $log_entry) {
             '%hostname' => $log_entry['ip'],
             '%timestamp' => $log_entry['timestamp'],
           );
-          $watchdog_console_log_bus[] = strtr($format, $replacements);
+          $watchdog_console_log_bus[] = array(
+            'message' => strtr($format, $replacements),
+            'variables' => $log_entry['variables']
+          );
         }
       }
     }
@@ -67,7 +70,10 @@ function watchdog_console_log_exit() {
     if ($watchdog_console_log_bus) {
       echo '<script> if (! window.console) console = { }; console.log = console.log || function(name, data) {};';
       foreach ($watchdog_console_log_bus as $message) {
-        echo 'console.log(' . json_encode($message) .  ');';
+        echo 'console.log(' . json_encode($message['message']) .  ');';
+        if (isset($message['variables'])) {
+          echo 'console.log(' . json_encode($message['variables']) .  ');';
+        }
       }
       echo '</script>';
     }
