Skip to content

Adopt Method #4

@jrf0110

Description

@jrf0110

It would be nice if one logger could adopt another:

var loglog = require('loglog');
var eLogger = loglog.create('Events');
var rLogger = loglog.create('Request');
var reLogger = rLogger.adopt( eLogger );

// [Request.Events] - ohai
reLogger.info('ohai');

This would work like normal inheritance, but just the other direction. All data and parents from the child will be appended to the parent in a new instance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions