{"id":20609555,"url":"https://github.com/mateodelnorte/llog","last_synced_at":"2025-07-03T14:33:30.645Z","repository":{"id":16475411,"uuid":"19227678","full_name":"mateodelnorte/llog","owner":"mateodelnorte","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-24T01:30:43.000Z","size":101,"stargazers_count":2,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-24T02:31:44.247Z","etag":null,"topics":["application-logging","javascript","log","logging","node"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mateodelnorte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2014-04-28T05:06:53.000Z","updated_at":"2022-05-11T18:18:18.000Z","dependencies_parsed_at":"2025-05-01T19:23:53.205Z","dependency_job_id":"c9e9a29f-9e0b-4818-a4cb-3042db5361d8","html_url":"https://github.com/mateodelnorte/llog","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/mateodelnorte/llog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateodelnorte%2Fllog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateodelnorte%2Fllog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateodelnorte%2Fllog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateodelnorte%2Fllog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mateodelnorte","download_url":"https://codeload.github.com/mateodelnorte/llog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mateodelnorte%2Fllog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261707923,"owners_count":23197904,"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":["application-logging","javascript","log","logging","node"],"created_at":"2024-11-16T10:13:52.897Z","updated_at":"2025-07-03T14:33:30.605Z","avatar_url":"https://github.com/mateodelnorte.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"llog\n====\n\nllog is a simple logging module. llog is intended for use in applications, not libraries. It provides level-based debugging (trace|debug|info|warn|error|fatal). `note: For adding detailed debug statements in libraries, use TJ's `debug` module.`\n\nAs an added bonus, llog provides a simple upgrade path from plain text to json logging via either pino or bunyan. `llog` will look for `pino` or `bunyan` at load time and automatically use them as a provider if present. This means you can write your apps with non-json logging when starting, and auto-magically all your logs to json logging with a simple `npm i --save pino`. \n\n## level-based debugging\n\nTo use llog:\n\n```\nvar log = require('llog');\n\nlog.debug('some info'); // prints 'debug some info' to stdout\nlog.info('some info'); // prints 'info some info' to stdout\nlog.warn('some info'); // prints 'warn some info' to stdout\nlog.error('some error'); // prints 'error some error' to stdout\n```\n\n## Specifying log levels\n\nllog is based on debug, and as such extends the same mechanism debug uses to specify which items to log - using `process.env.DEBUG`. \n\nTo log only info, warn, and error in llog, for instance, you would run your application similar to the following:\n\n```\nDEBUG=info,warn,error node app.js\n```\n\nAdding trace is simple: \n\n```\nDEBUG=trace,info,warn,error node app.js\n```\n\n## Magic upgrade to json logging\n\nllog will automatically detect if `bunyan` or `pino` are installed as a peer dependency and, if so, automatically upgrade to json logging. Because `bunyan` and `pino` use `process.env.LOG_LEVEL` as a level indicator (as opposed to `debug`'s `DEBUG` variable, the steps for moving to json logs are: \n\n1. `npm install --save buynan` or `npm install --save pino`\n2. execute your application using `LOG_LEVEL=10 node app` instead of using `DEBUG`. Higher levels are always included when specifying a level. \n\nBunyan log levels can be found at https://github.com/trentm/node-bunyan#levels. \nPino log levels can be found at https://github.com/pinojs/pino\n\nThis is particularly useful when moving from early stages of application development to having unified logging via Logstash or Splunk. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateodelnorte%2Fllog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmateodelnorte%2Fllog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmateodelnorte%2Fllog/lists"}