easy-logger-dev
v1.0.12
Published
A simple and lightweight JavaScript logging library that allows you to control the visibility of console logs dynamically via localStorage.
Downloads
53
Maintainers
Readme
Easy Logger
An easy to use logger controlled by localStorage.
Install
npm install easy-logger-dev
Download Extension
The download of the extension is important for the functionality of the npm package, as it creates the js_easylogger entry in the localStorage for each opened tab.
How to use?
Important: App name should contain only letters and underscores.
Typescript
import { setLogName, log, info, warn, error } from 'easy-logger-dev'
setLogName('app_testing')
log('log')
info('info')
warn('warn')
error('error')
Javascript
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/easy-logger-dev.js"></script>
<script>
EasyLogger.setLogName('app_testing')
// Install Extension before
EasyLogger.log('log');
EasyLogger.info('info');
EasyLogger.warn('warn');
EasyLogger.error('error');
</script>