UNPKG

log4javascript

Version:
91 lines (88 loc) 4.66 kB
<?xml version="1.0"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>log4javascript - backwards incompatibilities in version 1.4</title> <meta http-equiv="content-type" content="text/html; charset=iso-8859-1" /> <meta name="author" content="Tim Down - tim@log4javascript.org" /> <meta name="description" content="log4javascript, a logging framework for JavaScript based on log4j" /> <meta name="robots" content="all" /> <link rel="stylesheet" type="text/css" media="screen,print" href="../main.css" title="Default" /> </head> <body> <div id="container" class="nonav"> <div id="header"> <h1><a href="/index.html">log4javascript</a></h1> </div> <div id="content"> <div id="nav"> <a class="navitem" href="../index.html">home</a> | <a class="navitem" href="http://sourceforge.net/projects/log4javascript" target="_blank" title="Download (opens in new window)">download</a> | <a class="navitem" href="index.html">docs</a> | <a class="navitem" href="quickstart.html">quick start</a> | <a class="navitem" href="../demos/index.html">demos</a> | <a class="navitem" href="http://log4javascript.org" target="_blank">website</a> | <a class="navitem" href="http://www.timdown.co.uk" target="_blank">timdown.co.uk</a> </div> <h1>Backwards incompatibilities in log4javascript 1.4</h1> <ul> <li> Loggers are now hierarchical. This means logger names containing full stops have special meaning. For example, from version 1.4 the logger named <code>myapp.ajax</code> by default inherits all the appenders of the logger named <code>myapp</code>, while prior to version 1.4 these loggers would be entirely independent; </li> <li> The signature of the <code>log</code> method of <code>Logger</code> has changed. However, you should not use this method directly; instead, use one of the level-specific wrapper functions (<code>debug</code>, <code>info</code>, <code>error</code> etc.); </li> <li> Appenders can no longer be configured via constructor parameters. Instead you must use setter methods; </li> <li> The format of requests sent via <code><a href="manual.html#ajaxappender">AjaxAppender</a></code> has changed when using <code><a href="manual.html#jsonlayout">JsonLayout</a></code> or <code><a href="manual.html#xmllayout">XmlLayout</a></code>: the formatted log messages are sent as a name-value pair (with default name <code>data</code>) rather than a single unencoded string; </li> <li> All timestamps returned by <code><a href="manual.html#xmllayout">XmlLayout</a></code>, <code><a href="manual.html#jsonlayout">JsonLayout</a></code> and <code><a href="manual.html#httppostdatlayout">HttpPostDataLayout</a></code> are now measured in milliseconds since January 1st 1970 (previously they were returned as seconds since January 1st 1970); </li> <li> The constructors for <a href="manual.html#jsonlayout">JsonLayout</a> and <a href="manual.html#httppostdatlayout">HttpPostDataLayout</a> have changed; the property names used for the properties of the logging event are now set via <code>setKeys</code> rather than in the constructor; </li> <li> <code>setReadable</code> has been removed from <a href="manual.html#jsonlayout">JsonLayout</a>. The <code>readable</code> property should now be set via the constructor; </li> <li> <code>addErrorListener</code> and <code>removeErrorListener</code> removed from the <code>log4javascript</code> object and replaced with the more generic <code><a href="manual.html#log4javascriptaddeventlistener">addEventListener</a></code> and <code>removeEventListener</code> methods. The listener functions are passed different parameters. </li> </ul> </div> <div id="footer"> <span class="externallinkinfo"> <strong>NB.</strong> All external links open in a new window. </span> Written by Tim Down. <a href="mailto:tim@log4javascript.org">tim@log4javascript.org</a> <br /> log4javascript is distributed under the <a href="http://www.apache.org/licenses/LICENSE-2.0.html" title="Apache License, Version 2.0 (opens in new window)" target="_blank">Apache License, Version 2.0</a> </div> </div> </body> </html>