• Creates a logger for the passed component name.

    Parameters

    • name: string

    Returns Logger

    Example

    import { logger } from '@libp2p/logger'

    const log = logger('my-component')
    log.info('hello world')
    // logs "my-component hello world"