xxczaki / xa

Beautiful & Customizable logger :heart:

Home Page:https://npmjs.com/package/xa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

xa

Simple console logger, that works in Node.js, Electron and the Browser ❤️

Build Status XO Code Style Unicorn

Screenshot


Highlights

  • Simple API
  • Works in Node.js, Electron and the Browser
  • Customizable
  • Written in TypeScript

Install

npm install xa

Usage

const xa = require('xa');

xa.success('Build finished!');
xa.custom('TITLE', 'Nice description', {titleColor: 'yellow', backgroundColor: '#212121'});

API

xa

Main method

success(text)

text

Type: string

A text you want to display

info(text)

text

Type: string

A text you want to display

warning(text)

text

Type: string

A text you want to display

error(text)

text

Type: string

A text you want to display

custom(title, text, {titleColor, backgroundColor})

title

Type: string

Title of the log. When in Electron, the title will be either MAIN or RENDERER.

text

Type: string

A text you want to display

titleColor

Type: string Default: white

Color of the title. It will be converted to HEX.

backgroundColor

Type: string Default: black

Color of title's background. It will be converted to HEX.

Thanks:

License

MIT © Antoni Kepinski

About

Beautiful & Customizable logger :heart:

https://npmjs.com/package/xa

License:MIT License


Languages

Language:TypeScript 81.6%Language:JavaScript 18.4%