- Notifications
You must be signed in to change notification settings - Fork71
Bring console.log on the screen
License
chinchang/screenlog.js
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Bring console.log, on the screen
Ever faced a situation where you said "Why doesn't this bug show up when developer console is open!!"? And since the bug doesn't show when you have console open, you cannot do debug logging usingconsole.log.
Enterscreenlog.js.screenlog.js brings the developer console right on your screen so that you can do logging without having the developer console open always.
Donpm install screenlog orbower install screenlog ordownload the project.
Dropdist/screenlog.min.js into your web application and initialize it with:
screenLog.init();
And you are done!By default, every nextconsole.log (or info, warn and error) in your app now starts logging on the screen as well as the console. Or you can usescreenLog.log() instead to just log on the screen.
Initializes the screen logger. It creates a customizable panel on the screen.
options- A map of additional options.logColor- Text color. Default islightgreen.fontSize- Font size of logs. Default is1em(Your browser's default).bgColor- Background color of the log panel. Default isblack.releaseConsole- By default console.log is overridden to log on screen. You can avoid this behaviour by settingreleaseConsoletotrueand instead usescreenLog.log()API. Default isfalse.
Logs a message on the screen. Eg.screenLog.info('Info here').
obj1 ... objN- A list of JavaScript objects or strings to output. Just likeconsole.log.
Clears messages on the screen.
Removes the logger from the UI and reverts to original console functionality.
screenlog.js works best on latest versions of Google Chrome, Firefox and Safari.
Interested in contributing features and fixes?
See theChangelog
Copyright (c) 2015-2021 Kushagra Gour,https://kushagra.devLicensed under theMIT license.
About
Bring console.log on the screen
Topics
Resources
License
Contributing
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.
