Code Monkey home page Code Monkey logo

loxium's Introduction

Loxium - What is it?

Loxium allows you to do so much more than simply log a message, With Loxium not only can you log messages but you can add tags, Properties and enrich your logs with contextual information. It's also built with maximum extensibility allowing you to control where, when and how your logs are sent through it's clean and simple API. Loxium has been heavily influenced by Serilog, a logging package for .Net and my co-workers at Sequensis

Features

  • Supports standard trace/debug/info/warn/error logging levels
  • Works in all modern browsers & node.js
  • Filter logging by level
  • No dependencies,
  • Highly extensible allowing you to take logging further

Example - Browser

let builder = new loxium.LogBuilder();
    
let logger = builder.setMinimumLevel(loxium.LogLevel.Debug)
                    .build();

logger.debug((logBuilder) => logBuilder.withMessage('hello world'));

Output:

  • 17/09/2017, 14:40:16 [Debug] hello world

Example - Node

import { LogBuilder, LogLevel } from 'loxium'

let builder = new LogBuilder();

let logger = builder.setMinimumLevel(LogLevel.Debug)
                    .build();

logger.debug((logBuilder) => logBuilder.withMessage('hello world'));

Output:

  • 17/09/2017, 14:40:16 [Debug] hello world

Installation

Node - npm install loxium

CDN - <script src="https://cdn.jsdelivr.net/npm/loxium@latest/dist/loxium.min.js"></script>

For more advanced examples such as adding properties, tags, contextual information and shipping logs off to a server see docs

loxium's People

Contributors

supercide avatar

Watchers

James Cloos avatar  avatar

loxium's Issues

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.