FaasJS
Home
  • Guide
  • Documents
  • Starter Template
  • Changelog
  • Ecosystem

    • VS Code Plugin
    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
  • English
  • 简体中文
Home
  • Guide
  • Documents
  • Starter Template
  • Changelog
  • Ecosystem

    • VS Code Plugin
    • Docker Images
  • Github
  • Contributing
  • Sponsor
  • Security
  • English
  • 简体中文

Documents / @faasjs/logger / colorfy

Function: colorfy()

colorfy(level, message): string

Apply ANSI color codes to a message based on the log level.

Parameters

level

Level

The log level to determine the color.

message

string

The message to be colorized.

Returns

string

The colorized message string.