Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

llllogger

Customizable & Color-coded Terminal Logger for Node.js
Node.js를 위한 맞춤형 색상 지원 커스텀 터미널 로거

Generate config with a single llllogger build command, and freely add or modify custom loggers with your desired colors.
llllogger build 명령어 한 줄로 설정을 생성하고, 원하는 색상과 로거를 자유롭게 추가/수정하세요.


⚡ Features / 주요 기능

  • 🎨 Fully Customizable: Free to customize log levels and colors via configuration file.
    (설정 파일을 통해 색상과 로그 레벨을 자유롭게 커스텀할 수 있습니다.)
  • 🛠️ CLI Config Generator: Instantly generate llllogger.config.json using npx llllogger build.
    (npx llllogger build 한 줄로 설정 파일을 자동 생성합니다.)
  • 🧩 Dynamic Logger Methods: Log functions are generated dynamically based on your config.
    (설정 파일에 작성한 이름 그대로 로거 함수가 동적으로 생성됩니다.)
  • 📘 TypeScript Support: Includes full TypeScript definitions (index.d.ts).
    (타입스크립트 자동 완성을 완벽하게 지원합니다.)

📦 Installation / 설치

npm install llllogger

⚠️ Prerequisite (필수 조건): ESM Native ("type": "module" in package.json).


🛠️ Configuration / 설정

Run the command below at the project root to automatically generate the configuration file (llllogger.config.json).

프로젝트 루트에서 아래 명령어를 실행하여 설정 파일(llllogger.config.json)을 자동 생성합니다.

npx llllogger build

llllogger.config.json **In the generated configuration file, you can change the default colors or freely add any custom loggers you want. **

생성된 설정 파일에서 기본 색상을 변경하거나, 원하는 커스텀 로거를 자유롭게 추가할 수 있습니다.

export default {
  // Default Log Levels / 기본 로그 레벨
  info: 'blue',
  warn: 'yellow',
  wrong: 'bgRed.white',

  // Custom Log Levels / 자유롭게 추가하는 커스텀 로거
  success: 'green',
  debug: 'magenta',
  critical: 'bgRed.yellow.bold'
};

💡 Usage / 사용법

import { logger } from 'llllogger';

// 1. Default Loggers / 기본 로거 사용
logger.info('This is an info message. / 정보 메시지입니다.');
logger.warn('This is a warning message. / 경고 메시지입니다.');
logger.wrong('This is an error message. / 에러 메시지입니다.');

// 2. Custom Loggers (Added in llllogger.config.js) / 커스텀 로거 사용
logger.success('Successfully completed! / 성공적으로 완료되었습니다!');
logger.debug('Debug data: / 디버그 데이터:', { userId: 42 });
logger.critical('A critical error has occurred! / 치명적인 오류가 발생했습니다!');

About

Log delimitation package

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages