Bring console.log on the screen
Filed under development aidsShow All
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 using
screenlog.jsbrings the developer console right on your screen so that you can do logging without having the developer console open always.
npm install screenlogor
bower install screenlogor download the project.
dist/screenlog.min.jsinto your web application and initialize it with:
And you are done! By default, every next
console.log(or info, warn and error) in your app now starts logging on the screen as well as the console. Or you can use
screenLog.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 is
fontSize- Font size of logs. Default is
1em(Your browser's default).
bgColor- Background color of the log panel. Default is
releaseConsole- By default console.log is overridden to log on screen. You can avoid this behaviour by setting
trueand instead use
screenLog.log()API. Default is
screenLog.log, warn, error, info
Logs a message on the screen. Eg.
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 the Changelog
Copyright (c) 2015-2021 Kushagra Gour, https://kushagra.dev Licensed under the MIT license.