All Projects β†’ jonschlinkert β†’ log-utils

jonschlinkert / log-utils

Licence: MIT license
Basic logging utils: colors, symbols and timestamp.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to log-utils

leeks.js
Simple ANSI styling for your terminal
Stars: ✭ 12 (-50%)
Mutual labels:  console, color, colors, style, ansi, styles
yachalk
πŸ–οΈ Terminal string styling done right
Stars: ✭ 131 (+445.83%)
Mutual labels:  console, color, ansi, chalk
Mordant
Full-featured text styling for Kotlin command-line applications
Stars: ✭ 382 (+1491.67%)
Mutual labels:  console, color, ansi, ansi-colors
Chalk
πŸ– Terminal string styling done right
Stars: ✭ 17,566 (+73091.67%)
Mutual labels:  console, color, ansi, chalk
Colorful
Terminal string styling done right, in Python 🐍 πŸŽ‰
Stars: ✭ 456 (+1800%)
Mutual labels:  console, colors, style, ansi
concolor
Colouring template strings using tags with annotations 🎨
Stars: ✭ 35 (+45.83%)
Mutual labels:  console, color, colors, ansi
logt
πŸ–₯️ A colourful logger for the browser
Stars: ✭ 35 (+45.83%)
Mutual labels:  console, color, log
Giotto
Theme manager for your app: apply styles to anything you want through a plist file
Stars: ✭ 18 (-25%)
Mutual labels:  color, colors, styles
strip-ansi-stream
Strip ANSI escape codes
Stars: ✭ 32 (+33.33%)
Mutual labels:  console, color, ansi
ansiart2utf8
Processes legacy BBS-style ANSI art (ACiDDraw, PabloDraw, etc.) to UTF-8. Escape codes and line endings are processed for terminal friendliness.
Stars: ✭ 32 (+33.33%)
Mutual labels:  console, ansi, ansi-colors
Termenv
Advanced ANSI style & color support for your terminal applications
Stars: ✭ 555 (+2212.5%)
Mutual labels:  console, colors, ansi
Rang
A Minimal, Header only Modern c++ library for terminal goodies πŸ’„βœ¨
Stars: ✭ 1,080 (+4400%)
Mutual labels:  console, color, ansi
console-logging
Better, prettier commandline logging for Python--with colors! πŸ‘»
Stars: ✭ 111 (+362.5%)
Mutual labels:  console, color, colors
Chalk Animation
🎬 Colorful animations in terminal output
Stars: ✭ 1,489 (+6104.17%)
Mutual labels:  console, color, chalk
Tiza
Console styling for browsers
Stars: ✭ 74 (+208.33%)
Mutual labels:  console, color, style
go-color
A lightweight, simple and cross-platform package to colorize text in terminals
Stars: ✭ 65 (+170.83%)
Mutual labels:  console, color, ansi
Colorette
Easily set the color and style of text in the terminal.
Stars: ✭ 1,047 (+4262.5%)
Mutual labels:  console, colors, ansi
paper-terminal
Print Markdown to a paper in your terminal
Stars: ✭ 33 (+37.5%)
Mutual labels:  console, color, ansi
Ansi Econsole
Eclipse plugin that understands ANSI escape sequences to color the Eclipse console output.
Stars: ✭ 72 (+200%)
Mutual labels:  console, ansi, ansi-colors
Console Logging
Better, prettier commandline logging for Python--with colors! πŸ‘»
Stars: ✭ 111 (+362.5%)
Mutual labels:  console, color, colors

log-utils NPM version NPM monthly downloads NPM total downloads Linux Build Status

Tiny wrapper around ansi-colors to add colored symbols and a timestamp.

Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your ❀️ and support.

Install

Install with npm:

$ npm install --save log-utils

Usage

const log = require('log-utils');

API

.error

Get a red error symbol.

Example

console.log(log.error); //=> βœ–

.info

Get a cyan info symbol.

Example

console.log(log.info); //=> β„Ή

.success

Get a green success symbol.

Example

console.log(log.success); //=> βœ”

.warning

Get a yellow warning symbol.

Example

console.log(log.warning); //=> ⚠

.timestamp

Get a formatted timestamp.

Example

console.log(log.timestamp); //=> [15:27:46]

.ok

Returns a formatted string prefixed by a green check.

Example

console.log(log.ok('   foo'));
console.log(log.ok('  foo'));
console.log(log.ok(' foo'));
console.log(log.ok('foo'));
// Results in:
//    βœ” foo
//   βœ” foo
//  βœ” foo
// βœ” foo

.heading

Make the given text bold and underlined.

Example

console.log(log.heading('foo'));
// or
console.log(log.heading('foo', 'bar'));

Colors

Available colors from ansi-colors:

Changes

v0.2.0 (2016-07-16)

  • removed: all spinner methods

v0.1.5 (2016-07-16)

  • added: .header method
  • fixed: .ok method, so that whitespace is respected

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Running Tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test
Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Related projects

You might also be interested in these projects:

ansi-colors: Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in… more | homepage

Contributors

Commits Contributor
23 jonschlinkert
5 doowb

Author

Jon Schlinkert

License

Copyright Β© 2018, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.8.0, on November 17, 2018.

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].