All Projects → mengdu → Log.js

mengdu / Log.js

node.js 控制台日志打印工具

Programming Languages

javascript
184084 projects - #8 most used programming language
js
455 projects

Projects that are alternatives of or similar to Log.js

Htop
htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
Stars: ✭ 5,626 (+40085.71%)
Mutual labels:  console
Electron Log
Just a simple logging module for your Electron application
Stars: ✭ 765 (+5364.29%)
Mutual labels:  console
C Sharp Console Gui Framework
A GUI framework for C# console applications
Stars: ✭ 838 (+5885.71%)
Mutual labels:  console
Terminaltables
Generate simple tables in terminals from a nested list of strings.
Stars: ✭ 685 (+4792.86%)
Mutual labels:  console
Imgp
📸 High-performance cli batch image resizer and rotator
Stars: ✭ 744 (+5214.29%)
Mutual labels:  console
Logging Helpers
Basic template helpers for printing messages out to the console. Useful for debugging context in templates. Should work with any template engine.
Stars: ✭ 5 (-64.29%)
Mutual labels:  console
Konsul
A react renderer for browser's dev console
Stars: ✭ 605 (+4221.43%)
Mutual labels:  console
Ascii canvas
ASCII canvas for drawing in console
Stars: ✭ 11 (-21.43%)
Mutual labels:  console
Pry
A runtime developer console and IRB alternative with powerful introspection capabilities.
Stars: ✭ 6,351 (+45264.29%)
Mutual labels:  console
Console.md
Ever dreamed of rendering Markdown in the console? No. Neither had I.
Stars: ✭ 24 (+71.43%)
Mutual labels:  console
Python Progressbar
Progressbar 2 - A progress bar for Python 2 and Python 3 - "pip install progressbar2"
Stars: ✭ 682 (+4771.43%)
Mutual labels:  console
Suplemon
🍋 Console (CLI) text editor with multi cursor support. Suplemon replicates Sublime Text like functionality in the terminal. Try it out, give feedback, fork it!
Stars: ✭ 734 (+5142.86%)
Mutual labels:  console
Terminalview
Terminal inside Sublime Text 3 view
Stars: ✭ 897 (+6307.14%)
Mutual labels:  console
Ruby jard
Just Another Ruby Debugger. Provide a rich Terminal UI that visualizes everything your need, navigates your program with pleasure, stops at matter places only, reduces manual and mental efforts. You can now focus on real debugging.
Stars: ✭ 669 (+4678.57%)
Mutual labels:  console
Sadconsole
A .NET ascii/ansi console engine written in C# for MonoGame and XNA. Create your own text roguelike (or other) games!
Stars: ✭ 853 (+5992.86%)
Mutual labels:  console
Progressbar
Terminal-based progress bar for Java / JVM
Stars: ✭ 625 (+4364.29%)
Mutual labels:  console
Console Ultimate
Node-compatible `console` object with extra features
Stars: ✭ 5 (-64.29%)
Mutual labels:  console
Closestx11color
Find the closest xterm-256 colors (between 0 and 255) to an arbitrary HTML hexa color (e.g. #ABCDEF)
Stars: ✭ 13 (-7.14%)
Mutual labels:  console
Tui Consolelauncher
Linux CLI Launcher for Android
Stars: ✭ 861 (+6050%)
Mutual labels:  console
Autoprompt
Auto complete command prompts for C# .Net console apps
Stars: ✭ 22 (+57.14%)
Mutual labels:  console

log.js

log.js 是 node.js 的一个调试工具。

  • 支持彩色
  • 可以显示当前log调用脚本文件路径及行号

install

npm install -S log-mini

api

  • log.config({debug, absolute}) 配置
  • log(string)
  • log.info(string)
  • log.success(string)
  • log.error(string)
  • log.warn(string)

用法

const log = require('./log.js')

log.config({debug: true, absolute: false})

log('欢迎使用log.js。')

log.info('这是info提示信息')
log.success('这是success提示信息')
log.error('这是error提示信息')
log.warn('这是warn提示信息')

// 自定义log
log.addLog('test', 'cyan')

log.test('这是自定义的log')

log.addLog('debug', 'magenta')

log.debug('这是自定义的log')

可以运行 demo.js 查看效果

注:显示文件名和行号会影响js性能,上线项目请自行删掉log,或者配置debug为false

效果图

截图1 截图2

自定义log

log.addLog('名字', '颜色')

log.名字(str)

支持颜色有:

    white
    grey
    black
    blue
    cyan
    green
    magenta
    red
    yellow

other

colors

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].