PopLog is a simple, effective and lightweight JavaScript package that transforms console.log outputs into browser-friendly toast notifications. It makes debugging more interactive by displaying log messages as toasts on the screen, without the need to open developer tools.
- Converts
console.logmessages into styled toasts. - Simple to use and integrates with any web project.
- Automatic initialization — no setup required.
- Works across different environments and browsers.
Install as a development dependency:
npm install poplog --save-dev-
Download the
poplog.jsscript and include it in your project:import 'poplog';
-
Or, use the following CDN to include it directly in your HTML:
<script src="https://cdn.example.com/poplog.js"></script>
Once the script is included, PopLog automatically overrides console.log to show log messages as toasts.
console.log('This is a toast message!');
console.log('You can log anything, and PopLog will display it as a toast.');- PopLog listens to calls to
console.logand shows each message as a toast at the bottom of the screen. - The toast will automatically disappear after 4 seconds.
You can modify the appearance and behavior of the toasts by editing the index.js script in poplog node_modules directory. Customize styles such as background color, duration, and position as needed.
