Skip to content

Commit 11e2d45

Browse files
authored
Merge pull request #33 from stritti/develop
update of example
2 parents d06240d + 0428bbe commit 11e2d45

File tree

9 files changed

+242
-546
lines changed

9 files changed

+242
-546
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ log4js-servlet/lib/
99
log4js-site/build/
1010
/log4js-servlet/nbproject/private/
1111
/log4js-servlet/nbproject/
12-
/log4js/nbproject/private/
12+
/log4js/nbproject/private/
13+
log4js/.cache/

README.md

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,31 @@ Log4js
88

99
Log4js - The Logging Framework for JavaScript
1010

11-
### Moved to Github
12-
Since March 2014 the new location of Log4js is at Github!
13-
The Framework was hosted on log4js.berlios.de for a long time.
11+
## Usage
1412

15-
The website of Log4js: http://stritti.github.io/log4js/
13+
Add the JavaScript file to head of HTML page:
14+
````html
15+
<head>
16+
<script src="log4js.min.js" type="text/javascript"></script>
17+
</head>
1618

17-
### Development
19+
````
20+
Add script for instantiation of Logger:
21+
````javascript
22+
let consoleLog = new Log4js.Logger("consoleTest");
23+
consoleLog.setLevel(Log4js.Level.ALL);
24+
let consoleAppender = new Log4js.ConsoleAppender(true);
25+
consoleLog.addAppender(consoleAppender);
26+
27+
````
28+
Then you are able to add logging event:
29+
````javascript
30+
consoleLog.trace('I was traced!')
31+
````
32+
33+
Within sources there is a more detailed [example](log4js/src/main/example/index.html).
34+
35+
## Development
1836
To build the JavaScript library we use [npm](https://www.npmjs.com/) and [grunt](https://gruntjs.com/).
1937

2038
````
@@ -25,7 +43,20 @@ grunt build
2543

2644
Include then the `target/log4js.min.js` file in your project.
2745

28-
### Node.js
29-
There is a fork of log4js framework working with node.js: https://github.com/nomiddlename/log4js-node
46+
More details in the [Wiki](https://github.com/stritti/log4js/wiki/Development)
47+
48+
## Contribution
49+
50+
Pull Requests are very welcome.
51+
52+
## Other JavaScript Logger
53+
There are a lot other projects which are started logging in JavaScript:
54+
55+
There is a very active fork of current log4js framework modified for node.js usage: https://github.com/nomiddlename/log4js-node
56+
57+
Further loggers could be found (and added!) in the [Wiki](https://github.com/stritti/log4js/wiki/JavaScript-Logger).
58+
59+
# License
60+
[LICENSE.txt](LICENSE.txt)
3061

31-
[![Analytics](https://ga-beacon.appspot.com/UA-327996-12/stritti/log4js)](https://github.com/igrigorik/ga-beacon) ![license-image](http://img.shields.io/badge/license-Apache%202.0-blue.svg?style=flat) [license-url](LICENSE.txt)
62+
[![Analytics](https://ga-beacon.appspot.com/UA-327996-12/stritti/log4js)](https://github.com/igrigorik/ga-beacon)

log4js-examples/src/main/examples/index.html

Lines changed: 0 additions & 297 deletions
This file was deleted.

0 commit comments

Comments
 (0)