unjs / consola

🐨 Elegant Console Logger for Node.js and Browser

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

General purpose log method

tobiasdiez opened this issue · comments

Describe the feature

Add a new method that accepts the message and the log level as arguments.

Additional information

  • Would you be willing to help implement this feature?

I have a similar implementation in one of my projects:

import consola, { type logType } from 'consola'

export const useConsola = (
  type: Exclude<logType, 'silent' | 'verbose'>,
  message: any,
  ...args: any[]
) => consola[type](message, ...args)