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
- To include the code locally install
common-loggo
using npm:
npm install common-loggo
- To include the code globally from a cdn:
<script src="https://unpkg.com/[email protected]/dist/commonlogo.umd.js"></script>
common-loggo
has no external dependencies, just dev dependecies for the dev and build process.
<script src="https://unpkg.com/[email protected]/dist/commonlogo.umd.js"></script>
- 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
})
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')
common-loggo
allow you to:
commonloggo.hideLog()
hide the log in runtime (all the logs after call this method will be not printed)commonloggo.showLog()
show the log in runtime (all the logs after call this method will be printed)
- Open a GitHub issue
- Open a new GitHub pull request with the patch.
- Ensure the PR description clearly describes the problem and solution.
- Riccardo Canella @thecreazy
Thx to @Jei to be an excellent package name maker
MIT