
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@bearer/logger
Advanced tools
We recommend to create a logger file within you project
// my-logger.ts
import debug from '@bearer/logger'
export default () => debug('my-package-name')
then in your app
import debug from 'path/to/my-logger'
const logger = debug()
logger('message to debug')
logger({ object: 'something' })
// sub logger
const subLogger = logger.extend('sub-feature')
subLogger('blablabl')
You'll need to set DEBUG=*
to see all logs or DEBUG=bearer:my-package-name
to see logs produced by your application.
We assume you are writing a bearer integration.
views/src/my-component.tsx
import debug from '@bearer/logger'
const logger = debug('a-scope-you-provide')
class MyComponent {
componentDidLoad() {
logger('Loaded')
}
}
if you want to see logs you must enable it by setting the localStorage.debug
value from your console
Show all logs
localStorage.debug = '*'
Show bearer logs only
localStorage.debug = 'bearer:*'
Show your integration logs only
localStorage.debug = 'bearer:a-scope-you-provide:*'
FAQs
Bearer logger
The npm package @bearer/logger receives a total of 25 weekly downloads. As such, @bearer/logger popularity was classified as not popular.
We found that @bearer/logger demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.