Skip to content

[Feature] shimLog other console functions #97

Description

@svemat01

Is your feature request related to a problem? Please describe.
The shimLog feature allows us to overwrite console.log to a logger method, there are however many more methods in console that we should be able to override such as console.info, console.warn, and console.error

Describe the solution you'd like
optionally pass an object into shimLog instead of a string for the logger method to use. the object would have optional for each one and would only replace those included in the object.

// Replaces `console.log` with `log.debug` !
shimLog(log, 'debug');

// Replaces `console.?` with `log.?` !
shimLog(log, {
    log: 'debug',
    info: 'info',
    warn: 'warn',
    error: 'error',
});

Describe alternatives you've considered
Importing the normal logger everywhere

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions