Another logger using template literals for nodejs and browsers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
dig b350041ab4 First attempt, browser 1st 2 years ago
.gitignore Initial commit 2 years ago
LICENSE Initial commit 2 years ago
README.md First attempt, browser 1st 2 years ago
package.json First attempt, browser 1st 2 years ago
tagol.js First attempt, browser 1st 2 years ago

README.md

tagol

Another logger using template literals for nodejs and browsers

WIP !

Load

Browsers

<script src="//unpckg.org/tagol/tagol.js"></script>
or
<script type="module">
import log from '//unpckg.org/tagol/tagol.js'
</script>

Nodejs

require('tagol')
or
import 'tagol'
or
import log from 'tagol'
or
import { I: info, E: error } from 'tagol'

Usage

log `Some simple output`

log.S `Success`
log.W `Warning`
log.I `Info`
log.E `Error`

log `Some
multiline
text`

let substitution = { text: 'foo', obj: {some: 42} }
log.E `Error with ${substitution.text}s on object ${substitution.obj}o !`