{"id":15655543,"url":"https://github.com/jonschlinkert/log-utils","last_synced_at":"2025-04-15T01:42:49.297Z","repository":{"id":57741335,"uuid":"53779004","full_name":"jonschlinkert/log-utils","owner":"jonschlinkert","description":"Basic logging utils: colors, symbols and timestamp.","archived":false,"fork":false,"pushed_at":"2018-11-18T02:34:30.000Z","size":23,"stargazers_count":24,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-29T23:28:55.105Z","etag":null,"topics":["ansi","ansi-colors","chalk","color","colors","console","javascript","jonschlinkert","log","node","nodejs","style","styles","symbols","terminal","timestamp","unicode"],"latest_commit_sha":null,"homepage":"https://github.com/jonschlinkert","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-13T10:22:53.000Z","updated_at":"2023-09-08T17:08:04.000Z","dependencies_parsed_at":"2022-08-27T02:54:47.164Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/log-utils","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Flog-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Flog-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Flog-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Flog-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/log-utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248991511,"owners_count":21194893,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansi","ansi-colors","chalk","color","colors","console","javascript","jonschlinkert","log","node","nodejs","style","styles","symbols","terminal","timestamp","unicode"],"created_at":"2024-10-03T12:59:42.345Z","updated_at":"2025-04-15T01:42:49.283Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# log-utils [![NPM version](https://img.shields.io/npm/v/log-utils.svg?style=flat)](https://www.npmjs.com/package/log-utils) [![NPM monthly downloads](https://img.shields.io/npm/dm/log-utils.svg?style=flat)](https://npmjs.org/package/log-utils) [![NPM total downloads](https://img.shields.io/npm/dt/log-utils.svg?style=flat)](https://npmjs.org/package/log-utils) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/log-utils.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/log-utils)\n\n\u003e Tiny wrapper around ansi-colors to add colored symbols and a timestamp.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save log-utils\n```\n\n## Usage\n\n```js\nconst log = require('log-utils');\n```\n\n## API\n\n### [.error](index.js#L23)\n\nGet a red error symbol.\n\n**Example**\n\n```js\nconsole.log(log.error); //=\u003e ✖\n```\n\n### [.info](index.js#L35)\n\nGet a cyan info symbol.\n\n**Example**\n\n```js\nconsole.log(log.info); //=\u003e ℹ\n```\n\n### [.success](index.js#L47)\n\nGet a green success symbol.\n\n**Example**\n\n```js\nconsole.log(log.success); //=\u003e ✔\n```\n\n### [.warning](index.js#L59)\n\nGet a yellow warning symbol.\n\n**Example**\n\n```js\nconsole.log(log.warning); //=\u003e ⚠\n```\n\n### [.timestamp](index.js#L71)\n\nGet a formatted timestamp.\n\n**Example**\n\n```js\nconsole.log(log.timestamp); //=\u003e [15:27:46]\n```\n\n### [.ok](index.js#L93)\n\nReturns a formatted string prefixed by a green check.\n\n**Example**\n\n```js\nconsole.log(log.ok('   foo'));\nconsole.log(log.ok('  foo'));\nconsole.log(log.ok(' foo'));\nconsole.log(log.ok('foo'));\n// Results in:\n//    ✔ foo\n//   ✔ foo\n//  ✔ foo\n// ✔ foo\n```\n\n### [.heading](index.js#L112)\n\nMake the given text bold and underlined.\n\n**Example**\n\n```js\nconsole.log(log.heading('foo'));\n// or\nconsole.log(log.heading('foo', 'bar'));\n```\n\n### Colors\n\nAvailable colors from [ansi-colors](https://github.com/doowb/ansi-colors):\n\n## Changes\n\n**v0.2.0 (2016-07-16)**\n\n* `removed`: all spinner methods\n\n**v0.1.5 (2016-07-16)**\n\n* `added`: `.header` method\n* `fixed`: `.ok` method, so that whitespace is respected\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning 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:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Related projects\n\nYou might also be interested in these projects:\n\n[ansi-colors](https://www.npmjs.com/package/ansi-colors): Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in… [more](https://github.com/doowb/ansi-colors) | [homepage](https://github.com/doowb/ansi-colors \"Easily add ANSI colors to your text and symbols in the terminal. A faster drop-in replacement for chalk, kleur and turbocolor (without the dependencies and rendering bugs).\")\n\n### Contributors\n\n| **Commits** | **Contributor** |  \n| --- | --- |  \n| 23 | [jonschlinkert](https://github.com/jonschlinkert) |  \n| 5  | [doowb](https://github.com/doowb) |  \n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.8.0, on November 17, 2018._","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Flog-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Flog-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Flog-utils/lists"}