diff --git README.txt README.txt
old mode 100644
new mode 100755
index 7c33256..c289b47
--- README.txt
+++ README.txt
@@ -13,6 +13,13 @@ Features
 
 This module provides simple integration with the Apache log4php library.
 
+WARNING
+-------
+
+If you plan to view your log messages in a browser interface please use the
+LoggerRendererDrupalStandardObject renderer. Messages logged by other renderers are not passed through Drupal's
+check_plain() function and thus represent a security vector when viewed in a browser.
+
 
 Requirements
 ------------
diff --git includes/LoggerRendererDrupalLogObject.inc includes/LoggerRendererDrupalLogObject.inc
new file mode 100755
index 0000000..6ef8520
--- /dev/null
+++ includes/LoggerRendererDrupalLogObject.inc
@@ -0,0 +1,55 @@
+<?php
+
+/**
+ * Log4Php DrupalPlain Renderer
+ */
+class LoggerRendererDrupalLogObject implements LoggerRendererObject {
+
+  /**
+   * List of watchdog's log_entry array variables
+   */
+  public $type;
+  public $message;
+  public $variables;
+  public $severity;
+  public $link;
+  public $user;
+  public $request_uri;
+  public $referer;
+  public $ip;
+  public $timestamp;
+
+  // convenience property
+  public $user_name;
+
+  /**
+   * @param LoggerRendererDrupalLogObject $drupalLogObject
+   * @return string|void
+   * @throws Exception
+   */
+  public function render($drupalLogObject) {
+    throw new Exception('Do not use this class directly for logging');
+  }
+
+  /**
+   * @param array $log_entry
+   * @return LoggerRendererDrupalLogObject
+   */
+  public static function getInstanceFromLogEntry($log_entry) {
+    $object = new static();
+    $object->type = $log_entry['type'];
+    $object->message = $log_entry['message'];
+    $object->variables = $log_entry['variables'];
+    $object->severity = $log_entry['severity'];
+    $object->link = $log_entry['link'];
+    $object->user = $log_entry['user'];
+    $object->request_uri = $log_entry['request_uri'];
+    $object->referer = $log_entry['referer'];
+    $object->ip = $log_entry['ip'];
+    $object->timestamp = $log_entry['timestamp'];
+
+    $object->user_name = $log_entry['user']->uid > 0 ? $log_entry['user']->name : t('Anonymous');
+
+    return $object;
+  }
+}
diff --git includes/LoggerRendererDrupalPlainLocaleObject.inc includes/LoggerRendererDrupalPlainLocaleObject.inc
new file mode 100755
index 0000000..e52bda7
--- /dev/null
+++ includes/LoggerRendererDrupalPlainLocaleObject.inc
@@ -0,0 +1,21 @@
+<?php
+
+/**
+ * Log4Php CLI locale renderer
+ *
+ * Uses log4php_t function so that the message is being translated
+ *
+ * WARNING: the messages logged by this logger are not sanitized and are meant to be viewed in
+ * a terminal. Displaying these messages in a browser represents a potential security threat.
+ */
+class LoggerRendererDrupalPlainLocaleObject extends LoggerRendererDrupalLogObject {
+
+  /**
+   * @param LoggerRendererDrupalLogObject $drupalLogObject
+   * @return string
+   */
+  public function render($drupalLogObject) {
+    return "{$drupalLogObject->user_name} {$drupalLogObject->request_uri} {$drupalLogObject->ip} " .
+      log4php_t($drupalLogObject->message, is_array($drupalLogObject->variables) ? $drupalLogObject->variables : array());
+  }
+}
diff --git includes/LoggerRendererDrupalPlainObject.inc includes/LoggerRendererDrupalPlainObject.inc
new file mode 100755
index 0000000..32ca13f
--- /dev/null
+++ includes/LoggerRendererDrupalPlainObject.inc
@@ -0,0 +1,19 @@
+<?php
+
+/**
+ * Log4Php Drupal Plain Renderer
+ *
+ * WARNING: the messages logged by this logger are not sanitized and are meant to be viewed in
+ * a terminal. Displaying these messages in a browser represents a potential security threat.
+ */
+class LoggerRendererDrupalPlainObject extends LoggerRendererDrupalLogObject {
+
+  /**
+   * @param LoggerRendererDrupalLogObject $drupalLogObject
+   * @return string
+   */
+  public function render($drupalLogObject) {
+    return "{$drupalLogObject->user_name} {$drupalLogObject->request_uri} {$drupalLogObject->ip} " .
+      strtr($drupalLogObject->message, is_array($drupalLogObject->variables) ? $drupalLogObject->variables : array());
+  }
+}
diff --git includes/LoggerRendererDrupalStandardObject.inc includes/LoggerRendererDrupalStandardObject.inc
new file mode 100755
index 0000000..005990c
--- /dev/null
+++ includes/LoggerRendererDrupalStandardObject.inc
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * Log4Php Drupal Standard Renderer - messages logged by this renderer can be safely viewed in a browser
+ *
+ * Will pass log messages through t() function which in turn does check plain() and format_string().
+ */
+class LoggerRendererDrupalStandardObject extends LoggerRendererDrupalLogObject {
+
+  /**
+   * @param LoggerRendererDrupalLogObject $drupalLogObject
+   * @return string
+   */
+  public function render($drupalLogObject) {
+    return "{$drupalLogObject->user_name} {$drupalLogObject->request_uri} {$drupalLogObject->ip} " .
+      t($drupalLogObject->message, is_array($drupalLogObject->variables) ? $drupalLogObject->variables : array());
+  }
+}
diff --git log4php.info log4php.info
old mode 100644
new mode 100755
index 5b3f485..bfa9296
--- log4php.info
+++ log4php.info
@@ -1,3 +1,7 @@
 name = Apache log4php
 description = Logs and records system events to <a href="http://logging.apache.org/log4php/">Apache log4php</a>.
 core = 7.x
+files[] = includes/LoggerRendererDrupalLogObject.inc
+files[] = includes/LoggerRendererDrupalPlainLocaleObject.inc
+files[] = includes/LoggerRendererDrupalPlainObject.inc
+files[] = includes/LoggerRendererDrupalStandardObject.inc
diff --git log4php.module log4php.module
old mode 100644
new mode 100755
index 8b54096..a83e634
--- log4php.module
+++ log4php.module
@@ -17,20 +17,13 @@ function log4php_watchdog(array $log_entry) {
     require_once($logger_path);
     Logger::configure($conf['log4php_config']);
   }
-  
+
   $logger = Logger::getLogger('drupal:' . $log_entry['type']);
-  
-  // Construct plain-text message
-  $msg = array(
-    $log_entry['user']->uid > 0 ? $log_entry['user']->name : t('Anonymous'),
-    $log_entry['request_uri'],
-    $log_entry['ip'],
-    strip_tags(t($log_entry['message'], is_array($log_entry['variables']) ? $log_entry['variables'] : array())),
-  );
+
+  $log_object = LoggerRendererDrupalLogObject::getInstanceFromLogEntry($log_entry);
 
   // Allow other modules to change the format
-  drupal_alter('log4php', $msg, $log_entry);
-  $msg = implode(' ', $msg);
+  drupal_alter('log4php', $log_object);
 
   // Map Drupal severity levels to log4php levels
   // (Drupal currently has no analog to TRACE)
@@ -38,20 +31,20 @@ function log4php_watchdog(array $log_entry) {
     case WATCHDOG_EMERGENCY:
     case WATCHDOG_ALERT:
     case WATCHDOG_CRITICAL:
-      $logger->fatal($msg);
+      $logger->fatal($log_object);
       break;
     case WATCHDOG_ERROR:
-      $logger->error($msg);
+      $logger->error($log_object);
       break;
     case WATCHDOG_WARNING:
-      $logger->warn($msg);
+      $logger->warn($log_object);
       break;
     case WATCHDOG_NOTICE:
     case WATCHDOG_INFO:
-      $logger->info($msg);
+      $logger->info($log_object);
       break;
     case WATCHDOG_DEBUG:
-      $logger->debug($msg);
+      $logger->debug($log_object);
       break;
   }
 }
@@ -79,3 +72,47 @@ function _log4php_get_path() {
 
   return isset($path) ? $path : NULL;
 }
+
+/**
+ * Mostly a clone of t function which uses format_string() to sanitize log messages
+ * that are being shows in a page. We don't want that but we do need translation support
+ *
+ * @param $string
+ * @param array $args
+ * @param array $options
+ * @return array|null|string
+ */
+function log4php_t($string, array $args = array(), array $options = array()) {
+  global $language;
+  static $custom_strings;
+
+  // Merge in default.
+  if (empty($options['langcode'])) {
+    $options['langcode'] = isset($language->language) ? $language->language : 'en';
+  }
+  if (empty($options['context'])) {
+    $options['context'] = '';
+  }
+
+  // First, check for an array of customized strings. If present, use the array
+  // *instead of* database lookups. This is a high performance way to provide a
+  // handful of string replacements. See settings.php for examples.
+  // Cache the $custom_strings variable to improve performance.
+  if (!isset($custom_strings[$options['langcode']])) {
+    $custom_strings[$options['langcode']] = variable_get('locale_custom_strings_' . $options['langcode'], array());
+  }
+  // Custom strings work for English too, even if locale module is disabled.
+  if (isset($custom_strings[$options['langcode']][$options['context']][$string])) {
+    $string = $custom_strings[$options['langcode']][$options['context']][$string];
+  }
+  // Translate with locale module if enabled.
+  elseif ($options['langcode'] != 'en' && function_exists('locale')) {
+    $string = locale($string, $options['context'], $options['langcode']);
+  }
+  if (empty($args)) {
+    return $string;
+  }
+  else {
+    return strtr($string, $args);
+  }
+}
diff --git log4php.xml log4php.xml
old mode 100644
new mode 100755
index 2cf21a9..6d52f19
--- log4php.xml
+++ log4php.xml
@@ -1,5 +1,8 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration xmlns="http://logging.apache.org/log4php/">
+
+    <renderer renderedClass="LoggerRendererDrupalLogObject" renderingClass="LoggerRendererDrupalPlainLocaleObject" />
+
     <appender name="file" class="LoggerAppenderFile">
         <layout class="LoggerLayoutPattern" />
         <param name="file" value="/tmp/log4php.log" />
