# log4javascript

# Backwards incompatibilities in log4javascript 1.4

- Loggers are now hierarchical. This means logger names containing full stops have special meaning. For example, from version 1.4 the logger named `myapp.ajax` by default inherits all the appenders of the logger named `myapp`, while prior to version 1.4 these loggers would be entirely independent;
- The signature of the `log` method of `Logger` has changed. However, you should not use this method directly; instead, use one of the level-specific wrapper functions (`debug`, `info`, `error` etc.);
- Appenders can no longer be configured via constructor parameters. Instead you must use setter methods;
- The format of requests sent via `AjaxAppender` has changed when using `JsonLayout` or `XmlLayout`: the formatted log messages are sent as a name-value pair (with default name `data`) rather than a single unencoded string;
- All timestamps returned by `XmlLayout`, `JsonLayout` and `HttpPostDataLayout` are now measured in milliseconds since January 1st 1970 (previously they were returned as seconds since January 1st 1970);
- The constructors for JsonLayout and HttpPostDataLayout have changed; the property names used for the properties of the logging event are now set via `setKeys` rather than in the constructor;
- `setReadable` has been removed from JsonLayout. The `readable` property should now be set via the constructor;
- `addErrorListener` and `removeErrorListener` removed from the `log4javascript` object and replaced with the more generic `addEventListener` and `removeEventListener` methods. The listener functions are passed different parameters.