
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
typed-logging
Advanced tools
Minimal leightweight logging for TypeScript and JavaScript.
Log levels trace, debug, info, warn, error, silent.
Displays the correct line numbers in the browser.
Supports different log levels, if the level is set to warn
, only log.warn
and log.error
are executed. Other messages like log.info
stay silent.
Log methods gracefully fall back to simpler console logging methods if they are not supported in the environment. E.g. calls to log.debug() go to console.debug() if possible, otherwise to console.log().
Plugins may be used to transform the logging output, e.g. to prefix all messages with a timestamp.
Install node.js and then run npm install --save typed-logging
or yarn add typed-logging
to add typed-logging as a dependency.
And then use it
// when using TypeScript or ES6 modules
import log rom 'typed-logging';
// when using CommonJS
const { log } = require('typed-logging');
log.info('info')
In the browser, you can also directly use it as an UMD package from unpkg:
<script src="https://unpkg.com/typed-logging/dist/typed-logging.umd.js"></script>
This exposes the class window.Logger
and the default instance window.log
.
FAQs
Tiny logger with slim api and ability of limitless extension
The npm package typed-logging receives a total of 0 weekly downloads. As such, typed-logging popularity was classified as not popular.
We found that typed-logging demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.