Giter Club home page Giter Club logo

log4js's Introduction

Apache License Github Releases Built with Grunt Build Status

Log4js

Log4js - The Logging Framework for JavaScript with no runtime dependencies | Since 2005

Usage

  • Download the most current release and unzip the archive.
  • Copy the file js/log4js.min.js to your project.
  • Add the JavaScript file to head of HTML page:
    <head>
      <script src="log4js.min.js" type="text/javascript"></script>
    </head>
  • Add script for instantiation of Logger:
    let consoleLog = new Log4js.Logger("consoleTest");
    consoleLog.setLevel(Log4js.Level.ALL);
    let consoleAppender = new Log4js.ConsoleAppender(true);
    consoleLog.addAppender(consoleAppender);
  • Then you are able to add logging event:
    consoleLog.trace('I was traced!')

Within sources there is a more detailed example.

Development

The project is seperated in modules. Core JavaScript module is located in subdirectory log4js

Structure

├───log4js: Main JavaScript Log4js module 
├───log4js-servlet: Java Servlet to collect AJAX-Logs serverside
├───log4js-solr: configuration to collect logs using Apache SOLR
├───log4js-site: (outdated) project documentation
 

Log4js

Main JavaScript module

To build the JavaScript library we use npm and grunt.

cd log4js
npm install
grunt build

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

More details in the Wiki

Log4js Servlet

The servlet is Java based project which is compiled using maven.

Log4js SOLR

For more details see README.md in the subdirectory log4js-solr

Log4js Site

Outdated documentation.

Contribution

Pull Requests are very welcome.

Other JavaScript Logger

There are a lot other projects which are started logging in JavaScript:

There is a very active fork of current log4js framework modified for node.js usage: https://github.com/nomiddlename/log4js-node

Further loggers could be found (and added!) in the Wiki.

License

LICENSE.txt

Analytics

log4js's People

Contributors

stritti avatar dmytrolev avatar dependabot[bot] avatar hemanth avatar japzio avatar lsiegert avatar philipp-spiess avatar imgbot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.