Reflect changes to ExceptionLog in 3536d2fe3861c5da467bbff4ff42efb24c9ad9c3
authorTim Düsterhus <duesterhus@woltlab.com>
Wed, 24 Apr 2013 16:59:11 +0000 (18:59 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Wed, 24 Apr 2013 17:00:00 +0000 (19:00 +0200)
wcfsetup/install/files/acp/templates/exceptionLogView.tpl
wcfsetup/install/files/lib/acp/page/ExceptionLogViewPage.class.php
wcfsetup/install/files/lib/system/exception/LoggedException.class.php

index 4c7517ee5bdd09dbadda962761967878846ac14b..bcfbd399b6779448e5d88ba30ccc2c64e1903393 100644 (file)
                                                <dt>{lang}wcf.acp.exceptionLog.exception.referrer{/lang}</dt>
                                                <dd>{$exception[referrer]}</dd>
                                        </dl>
+                                       <dl>
+                                               <dt>{lang}wcf.acp.exceptionLog.exception.userAgent{/lang}</dt>
+                                               <dd>{$exception[userAgent]}</dd>
+                                       </dl>
                                        <dl>
                                                <dt>{lang}wcf.acp.exceptionLog.exception.stacktrace{/lang}</dt>
                                                <dd style="font-family: monospace; word-wrap: wrap-all; word-break: break-all;">
index bbe0f88126c8ec815aa7c28fd407c9c605b33876..7c0547dcdda7ff3d3ec0ce6546260daea46847cd 100644 (file)
@@ -126,6 +126,7 @@ PHP version: (?<phpVersion>.*?)
 WCF version: (?<wcfVersion>.*?)
 Request URI: (?<requestURI>.*?)
 Referrer: (?<referrer>.*?)
+User-Agent: (?<userAgent>.*?)
 Stacktrace: 
 (?<stacktrace>.*)', Regex::DOT_ALL);
                $stackTraceFormatter = new Regex('^\s+(#\d+)', Regex::MULTILINE);
index 21d1682de1f9e4df3fe48fda298ccf0ed1026b6f..6b1bc07bd73ca44b291d92c357adbcb266721059 100644 (file)
@@ -79,6 +79,7 @@ class LoggedException extends \Exception {
                
                $e = ($this->getPrevious() ?: $this);
                
+               // don't forget to update ExceptionLogViewPage, when changing the log file format
                $message = date('r', TIME_NOW)."\n".
                        'Message: '.$e->getMessage()."\n".
                        'File: '.$e->getFile().' ('.$e->getLine().")\n".