pmusolino / common-loggo

Fancy logging for your browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

๐Ÿ• Common Loggo

commonloggoimage

Common Loggo is an fancy log library for your browser.

With Common Loggo you can use the default style of logging, ovverride it or create new with a simple json config.

You can find the preview on the Github page

Getting started

  1. To include the code locally install common-loggo using npm:
npm install common-loggo --save
  1. To include the code globally from a cdn:
<script src="https://unpkg.com/common-loggo@1.0.0/dist/commonlogo.umd.js"></script>

Dependencies

common-loggo has no external dependencies, just dev dependecies for the dev and build process.

Documentation

Include common-loggo in your scripts:

<script src="https://unpkg.com/common-loggo@1.0.0/dist/commonlogo.umd.js"></script>

Init the script passing optionally:

  • some new log configuration
  • style and other global configuration
commonloggo.init({
 loggo: {
  label: 'Loggo',
  color: 'white',
  background: 'blue'
 },
 rock: {
  label: '๐ŸคŸ',
  color: 'black',
  background: 'white'
 }
}, {
 style: {
  fontSize: '14px'
 },
 showLog: true // default = true, you should don't pass it, if u pass false no log will be printed
})

Start using the libray

commonloggo.info('this is an info log')
commonloggo.error('this is an error log')
commonloggo.warn('this is a warning log')
commonloggo.success('this is a success log')
commonloggo.loggo('this is a loggo log')
commonloggo.loggo('this is a loggo log with a json and a string', {
 loggo: 'logged'
})
commonloggo.rock('check my work on https://canellariccardo.it')

See the results

screenimage

Contributing

Reporting bugs

  • Open a GitHub issue

Contributing with patches and bug fixes

  • Open a new GitHub pull request with the patch.
  • Ensure the PR description clearly describes the problem and solution.

Contributors

Special mention

Thx to @Jei to be an excellent package name maker

License

MIT

About

Fancy logging for your browser

License:MIT License


Languages

Language:JavaScript 100.0%