Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
log4javascript
==============
# log4javascript

http://log4javascript.org
<http://log4javascript.org>

It contains the log4javascript lib prepared to be used with npm
It contains the log4javascript lib prepared to be used with npm.

Unfortunately, the npm package 1.4.16 still contains log4javascript 1.4.13.
It was necessary to increase the version since the new package contains also TypeScript definitions.

## Changes

1.4.16 (6-Dec-2020)

- improve typescript definitions

1.4.15 (13-May-2016)

- add typescript definitions
17 changes: 16 additions & 1 deletion changelog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
log4javascript change log
-------------------------

1.4.13 (23/5/2015)
- Fix for BrowserConsolerAppender regression in last version (feature request
14)

1.4.12 (14/5/2015)
- Fix for BrowserConsolerAppender error in IE <= 8 (issue 18)

1.4.11 (19/2/2015)
- Fix for CORS requests in IE 10+
- Remove message when sending remaining Ajax log messages when unloading

1.4.10 (28/9/2014)
- AMD support added
- Fix for issue 16: getDefaultLogger() broken in production edition

1.4.9 (12/5/2014)
- Fix for typo in BrowserConsoleAppender

Expand Down Expand Up @@ -31,7 +46,7 @@ log4javascript change log
at the expense of popping up a confirm dialog. That being the case, it is now
disabled by default.

- Removed leaked global variable "initialized"
- Removed leaked global variable "initialized"

- Fixed bugs #3528265, #3560924, #3560922, #2805479, #3510639 on Sourceforge
Tracker
Expand Down
20 changes: 10 additions & 10 deletions console_uncompressed.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
}
} else {
var groupElementContainer = this;

this.mainDiv = document.createElement("div");
this.mainDiv.className = "group";

Expand All @@ -174,7 +174,7 @@
this.expander.unselectable = true;
var expanderText = this.group.expanded ? "-" : "+";
this.expanderTextNode = this.expander.appendChild(document.createTextNode(expanderText));

this.headingDiv.appendChild(document.createTextNode(" " + this.group.name));

this.contentDiv = this.mainDiv.appendChild(document.createElement("div"));
Expand Down Expand Up @@ -632,7 +632,7 @@
rootGroup = new Group("root", true);
rootGroup.render();
currentGroup = rootGroup;

setCommandInputWidth();
setLogContainerHeight();
toggleLoggingEnabled();
Expand Down Expand Up @@ -757,9 +757,9 @@

function LogItemContentReverser() {
}

LogItemContentReverser.prototype = new LogItemVisitor();

LogItemContentReverser.prototype.visitGroup = function(group) {
group.reverseChildren();
this.visitChildren(group);
Expand Down Expand Up @@ -1779,10 +1779,10 @@

if (!Array.prototype.push) {
Array.prototype.push = function() {
for (var i = 0, len = arguments.length; i < len; i++){
this[this.length] = arguments[i];
}
return this.length;
for (var i = 0, len = arguments.length; i < len; i++){
this[this.length] = arguments[i];
}
return this.length;
};
}

Expand Down Expand Up @@ -2130,7 +2130,7 @@
span.pre {
white-space: pre;
}

pre.unwrapped {
display: inline !important;
}
Expand Down
2 changes: 1 addition & 1 deletion docs/lite.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ <h2>Code</h2>
if(!Array.prototype.shift){Array.prototype.shift=function(){if(this.length>0){var firstItem=this[0];for(var i=0,len=this.length-1;i<len;i++){this[i]=this[i+1];}
this.length--;return firstItem;}};}
var log4javascript;(function(){var newLine="\r\n";function Log4JavaScript(){}
log4javascript=new Log4JavaScript();log4javascript.version="1.4.9";log4javascript.edition="log4javascript_lite";function getExceptionMessage(ex){if(ex.message){return ex.message;}else if(ex.description){return ex.description;}else{return String(ex);}}
log4javascript=new Log4JavaScript();log4javascript.version="1.4.13";log4javascript.edition="log4javascript_lite";function getExceptionMessage(ex){if(ex.message){return ex.message;}else if(ex.description){return ex.description;}else{return String(ex);}}
function getUrlFileName(url){var lastSlashIndex=Math.max(url.lastIndexOf("/"),url.lastIndexOf("\\"));return url.substr(lastSlashIndex+1);}
function getExceptionStringRep(ex){if(ex){var exStr="Exception: "+getExceptionMessage(ex);try{if(ex.lineNumber){exStr+=" on line number "+ex.lineNumber;}
if(ex.fileName){exStr+=" in file "+getUrlFileName(ex.fileName);}}catch(localEx){}
Expand Down
39 changes: 31 additions & 8 deletions docs/manual.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ <h1>log4javascript 1.4 manual</h1>
<h2>Contents</h2>
<ul>
<li><a href="#intro">Introduction</a></li>
<li><a href="#amd">AMD</a></li>
<li><a href="#noteaboutlog4javascript">Note about the log4javascript object</a></li>
<li>
<a href="#loggersappenderslayoutslevels">Loggers, appenders, layouts and levels</a>
Expand Down Expand Up @@ -88,12 +89,28 @@ <h2>Introduction</h2>
<a href="#container">Top</a>
</p>
</div>
<div id="amd">
<h2>AMD</h2>
<p>
Since version 1.4.10, log4javascript comes with AMD support hence can be loaded by a script
loader such as <a href="http://requirejs.org/" title="RequireJS website (opens in new window)"
target="_blank">RequireJS</a>.
</p>
<p>
The current version of JavaScript is designed only to run in a browser. If not using AMD,
log4javascript creates a single property of the global object (to all intents and purposes, a
global variable) called <code>log4javascript</code>.
</p>
<p class="linktotop">
<a href="#container">Top</a>
</p>
</div>
<div id="noteaboutlog4javascript">
<h2>Note about the log4javascript object</h2>
<p>
All of log4javascript's instantiable classes are accessible via the log4javascript object, which
acts as a namespace. Therefore references to all class names must be preceded with "log4javascript.".
For example:
acts as a namespace. Therefore references to all class names must be preceded with
"log4javascript.". For example:
</p>
<p>
<code>var popUpAppender = new log4javascript.PopUpAppender();</code>
Expand Down Expand Up @@ -287,11 +304,17 @@ <h4>Methods</h4>
<div class="name">getDefaultLogger</div>
<div class="methodsignature"><code>Logger <strong>getDefaultLogger</strong>()</code></div>
<div class="summary">
Convenience method that returns the default logger. The default logger
has a single appender: a <code><a href="#popupappender">PopUpAppender</a></code>
with the default layout, width and height, and with <code>focusPopUp</code> set to false
and <code>lazyInit</code>, <code>useOldPopUp</code> and
<code>complainAboutPopUpBlocking</code> all set to true.
<p>
Convenience method that returns the default logger. In the standard edition, the
default logger has a single appender: a
<code><a href="#popupappender">PopUpAppender</a></code> with the default layout,
width and height, and with <code>focusPopUp</code> set to false and
<code>lazyInit</code>, <code>useOldPopUp</code> and
<code>complainAboutPopUpBlocking</code> all set to true.
</p>
<p>
In the production edition, the default logger has no appenders.
</p>
</div>
</li>
<li class="method">
Expand Down Expand Up @@ -601,7 +624,7 @@ <h4>Logger methods</h4>
</li>
<li class="method">
<div class="name">getAdditivity</div>
<div class="methodsignature"><code>Level <strong>getLevel</strong>()</code></div>
<div class="methodsignature"><code>Boolean <strong>getAdditivity</strong>()</code></div>
<div class="summary">
Returns whether additivity is enabled for this logger.
</div>
Expand Down
20 changes: 10 additions & 10 deletions js/console_uncompressed.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
}
} else {
var groupElementContainer = this;

this.mainDiv = document.createElement("div");
this.mainDiv.className = "group";

Expand All @@ -174,7 +174,7 @@
this.expander.unselectable = true;
var expanderText = this.group.expanded ? "-" : "+";
this.expanderTextNode = this.expander.appendChild(document.createTextNode(expanderText));

this.headingDiv.appendChild(document.createTextNode(" " + this.group.name));

this.contentDiv = this.mainDiv.appendChild(document.createElement("div"));
Expand Down Expand Up @@ -632,7 +632,7 @@
rootGroup = new Group("root", true);
rootGroup.render();
currentGroup = rootGroup;

setCommandInputWidth();
setLogContainerHeight();
toggleLoggingEnabled();
Expand Down Expand Up @@ -757,9 +757,9 @@

function LogItemContentReverser() {
}

LogItemContentReverser.prototype = new LogItemVisitor();

LogItemContentReverser.prototype.visitGroup = function(group) {
group.reverseChildren();
this.visitChildren(group);
Expand Down Expand Up @@ -1779,10 +1779,10 @@

if (!Array.prototype.push) {
Array.prototype.push = function() {
for (var i = 0, len = arguments.length; i < len; i++){
this[this.length] = arguments[i];
}
return this.length;
for (var i = 0, len = arguments.length; i < len; i++){
this[this.length] = arguments[i];
}
return this.length;
};
}

Expand Down Expand Up @@ -2130,7 +2130,7 @@
span.pre {
white-space: pre;
}

pre.unwrapped {
display: inline !important;
}
Expand Down
2 changes: 1 addition & 1 deletion js/liteconsole_uncompressed.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
font-family: tahoma, verdana, arial, helvetica, sans-serif;
overflow: hidden;
}

div#toolbar {
border-top: solid #ffffff 1px;
border-bottom: solid #aca899 1px;
Expand Down
Loading