{"id":16625485,"url":"https://github.com/aleclarson/lodge","last_synced_at":"2026-03-18T21:02:57.133Z","repository":{"id":66177820,"uuid":"138070320","full_name":"aleclarson/lodge","owner":"aleclarson","description":"Isomorphic console w/ inspection, colors, namespaces, and configuration","archived":false,"fork":false,"pushed_at":"2021-02-10T03:24:14.000Z","size":47,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-10T08:04:13.831Z","etag":null,"topics":["console","logger","logging","minimal"],"latest_commit_sha":null,"homepage":"","language":"CoffeeScript","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/aleclarson.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-06-20T18:21:53.000Z","updated_at":"2023-07-01T19:29:00.000Z","dependencies_parsed_at":"2023-02-20T17:15:38.975Z","dependency_job_id":null,"html_url":"https://github.com/aleclarson/lodge","commit_stats":{"total_commits":65,"total_committers":3,"mean_commits":"21.666666666666668","dds":0.07692307692307687,"last_synced_commit":"fcb61f2e1c84deb487c8b23ab80af08d5350cb23"},"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Flodge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Flodge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Flodge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleclarson%2Flodge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleclarson","download_url":"https://codeload.github.com/aleclarson/lodge/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271492,"owners_count":20911586,"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":["console","logger","logging","minimal"],"created_at":"2024-10-12T04:05:51.099Z","updated_at":"2026-03-18T21:02:52.081Z","avatar_url":"https://github.com/aleclarson.png","language":"CoffeeScript","funding_links":["https://paypal.me/alecdotbiz"],"categories":[],"sub_categories":[],"readme":"# lodge\n\n[![npm](https://img.shields.io/npm/v/lodge.svg)](https://www.npmjs.com/package/lodge)\n[![Bundle size](https://badgen.net/bundlephobia/min/lodge)](https://bundlephobia.com/result?p=lodge)\n[![Install size](https://packagephobia.now.sh/badge?p=lodge)](https://packagephobia.now.sh/result?p=lodge)\n[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://paypal.me/alecdotbiz)\n\n```js\nconst log = require('lodge');\n\n// simplest case\nlog('hello world');\n\n// multiple arguments\nlog('hello', 'world');\n\n// non-strings are pretty-printed\nlog('object:', { hello: 'world' });\n\n// first argument can be a format string\nlog('string: %s, object: %O', 100, { hello: 'world' });\n\n// join the given arguments into a formatted string\nlog.stylize('string: %s, object: %O', 100, { hello: 'world' });\n\n// ansi colors included\nlog(log.red('CODE RED'));\n\n// warnings\nlog.warn('be careful');\n\n// print to stderr\nlog.error('oh crap');\n\n// print a strack trace\nlog.trace();\n\n// clear the console/terminal\nlog.clear();\n\n// namespaces\nconst log2 = log.debug('foo');\n\n// must set DEBUG=1 or DEBUG=foo to see this\nlog2('something useful in debugging');\n\n// DEBUG=1 is not required to see warnings/errors\nlog2.warn('foo is deprecated');\n\n// prefixes\nlog2.prefix('[foo]');\nlog2.prefix(() =\u003e `[${new Date().toISOString()}]`);\n```\n\nThe built-in `console` functions are used when the global `window` variable exists. Otherwise, functions with similar behavior are used with the `process.stdout` or `process.stderr` streams.\n\nYou may override `log.cleanStack` to customize the output of the `trace` method.\n\n### Environment variables\n\nUse `QUIET=1` to disable all messages. The `--quiet` CLI flag also works.\n\nThe `DEBUG` environment variable is flexible. `DEBUG=1` enables all debug logs. The asterisk (`*`) allows for globbing. For example, `a*` matches both `abc` and `acb` but not `cba`. The comma (`,`) lets you specify multiple globs. The `--debug` CLI flag is identical to `DEBUG=1`.\n\nUse `NO_COLOR=1` to disable ANSI colors. The `--no-color` CLI flag also works.\n\nUse `NO_WARNINGS=1` to disable warning messages. The `--no-warnings` CLI flag also works.\n\nUse `TRACE_WARNINGS=1` to attach a stack trace to each warning.\n\nFor browser environments, you can set these properties on the `window` object before importing this library.\n\n### Colors\n\nThe following ANSI colors are available: (256 color spectrum)\n- red\n- blue\n- green\n- yellow\n- cyan\n- pink\n- white\n- silver\n- gray\n- coal\n- black\n\nThe non-grayscale colors all have light variants available as `lred`, `lblue`, `lgreen`, etc.\n\n### Prefixes\n\nYou can set the `prefix` method of the main logger (or a namespace) if you want to prepend a string to every message.\n\n```js\nconst foo = log.debug('foo');\nfoo.prefix = () =\u003e `[${new Date().toISOString()}] foo:`\n\nfoo('test') // =\u003e '[2018-06-28T20:03:48.892Z] foo: test'\n```\n\nLoggers created by the `create` or `debug` method will inherit the prefix of their ancestors.\n\nLoggers created with the `debug` method have a default prefix of their identifier with a dark gray color.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleclarson%2Flodge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleclarson%2Flodge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleclarson%2Flodge/lists"}