{"id":19603354,"url":"https://github.com/rsify/log","last_synced_at":"2025-02-26T15:43:38.280Z","repository":{"id":57131107,"uuid":"85725962","full_name":"rsify/log","owner":"rsify","description":"tiny logging utility","archived":false,"fork":false,"pushed_at":"2017-03-23T12:47:45.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-16T08:31:53.522Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/rsify.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":"2017-03-21T16:19:41.000Z","updated_at":"2022-10-17T22:27:24.000Z","dependencies_parsed_at":"2022-08-24T14:59:37.359Z","dependency_job_id":null,"html_url":"https://github.com/rsify/log","commit_stats":null,"previous_names":["nikersify/log"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsify%2Flog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsify%2Flog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsify%2Flog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rsify%2Flog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rsify","download_url":"https://codeload.github.com/rsify/log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240887215,"owners_count":19873531,"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":[],"created_at":"2024-11-11T09:29:15.638Z","updated_at":"2025-02-26T15:43:38.233Z","avatar_url":"https://github.com/rsify.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# log\n\ntiny logging utility\n\n![screenshot](https://i.nikerino.com/syofy6.png)\n\n```sh\n# logs/?.log\n(21-03-2017 20:03) [INFO] [app] starting...\n(21-03-2017 20:03) [SUCCESS] [app] read config.json\n(21-03-2017 20:03) [INFO] [app] started in development mode\n(21-03-2017 20:03) [INFO] [db] attempting to connect...\n(21-03-2017 20:03) [WARN] [db] credentials missing, trying defaults...\n(21-03-2017 20:03) [SUCCESS] [db] connected!\n(21-03-2017 20:03) [INFO] [http] preparing html cache...\n(21-03-2017 20:03) [SUCCESS] [http] cache ready!\n(21-03-2017 20:03) [ERROR] [http] missing ssl certs\n(21-03-2017 20:03) [INFO] [http] server listening on port 3090\n(21-03-2017 20:03) [TRACE] [http] 54.73.249.176 POST /api/get_thing 400\n(21-03-2017 20:03) [TRACE] [http] 184.133.232.60 GET /\n(21-03-2017 20:03) [TRACE] [http] 184.133.232.60 GET /favicon.ico 404\n(21-03-2017 20:03) [FATAL] [app] spaghetti monster ate us\n```\n\n# example\n\n```js\nconst log = require('@nikersify/log')\n\nlog.info('app', 'starting...')\nlog.success('app', `read ${log.e('config.json')}`)\nlog.info('app', `started in ${log.e('development')} mode`)\nlog.info('db', 'attempting to connect...')\nlog.warn('db', 'credentials missing, trying defaults...')\nlog.success('db', 'connected!')\nlog.info('http', 'preparing html cache...')\nlog.success('http', 'cache ready!')\nlog.error('http', 'missing ssl certs')\nlog.info('http', `server listening on port ${log.e(3090)}`)\nlog.trace('http', '54.73.249.176 POST /api/get_thing 400')\nlog.trace('http', '184.133.232.60 GET /')\nlog('uber debug msg!!')\nlog.trace('http', '184.133.232.60 GET /favicon.ico 404')\nlog.fatal('app', 'spaghetti monster ate us')\n```\n\n# methods\n\n### `log(msg)`\n\nUse for debugging, not saved to `.log`'s, hidden if `NODE_ENV === 'PRODUCTION'`.\n\n### `log.[level]([scope], message)`\nWhere `scope` is optional and `level` can be one of the following:\n* `info` - not the most important information\n* `warn` - things might be going funky\n* `error` - bad, but doesn't crash\n* `fatal` - oh lord.\n* `success` - something goes right for once\n* `trace` - http server logs, db logs, spam, etc.\n\nPrints out a nicely formatted line and saves to `.log`'s.\n\n### `log.e(msg)`\nEmphasize a word or two, used as the following\n```js\nlog.success('app', `read ${log.e('config.json')}`) \n```\n\n### `log.inspect(object)`\nStdout a deep representation of the given object.\n\n# install\n\n`npm install --save @nikersify/log`\n\n# license\n\nMIT","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsify%2Flog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frsify%2Flog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frsify%2Flog/lists"}