Giter Site home page Giter Site logo

rondin.js's Introduction

rondin.js

What is it?

A TypeScript and JavaScript library that provides basic logging facilities based on Google Chrome's console api.

Browser support

  • Developed for Chrome
  • Tested for Chrome

Usage

  1. Add rondin.js to your web page
  2. Open Chrome's JavaScript console via Menu > Tools > JavaScript console
  3. Add logging to your application
    // Set default logging level. By default, only INFO messages are enabled on all loggers.
    Rondin.setDefaultLogLevel(LogLevel.TRACE)

    // Get a logger
    var logger = Rondin.get("RobinHood.js")
    
    // Use the various log levels
    logger.trace("Hello. This is TRACE.")
    logger.debug("Hello. This is DEBUG.")
    logger.info("Hello. This is INFO.")
    logger.warn("Hello. This is WARN.")
    logger.error("Hello. This is ERROR.")
    
    // Log full JSON objects
    var forest = {
      name: "Sherwood",
      size : { value: 423.2, unit: "hectares" },
      trees : ["Pine", "Oak", "Birch"]
    }
    
    logger.info("Entering the forest", forest);
  
    // Log using string formats
    var hero = "Robin Hood"
    logger.info("Hello %s!", hero) 
    
    // Change specific logger level
    var noisyLogger = Rondin.get("Nottingham.js")
    noisyLogger.level = LogLevel.OFF
    
    // Customize the style of the log output
    Rondin.DEBUG.style = "color:#CFB52B" // standard CSS
    logger.debug("Take this gold!")

Console API documentation

https://developers.google.com/chrome-developer-tools/docs/console-api

What's up with the name?

http://translate.google.com/#fr/en/rondin

rondin.js's People

Contributors

guisim avatar

Stargazers

William Fortin avatar  avatar Marilyne Chan avatar

Watchers

James Cloos avatar  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.