{"id":28823552,"url":"https://github.com/gcsboss/golog","last_synced_at":"2026-04-16T19:43:58.096Z","repository":{"id":62421875,"uuid":"210908070","full_name":"GCSBOSS/golog","owner":"GCSBOSS","description":"A light-weight heavily inspired logging library for NodeJS","archived":false,"fork":false,"pushed_at":"2021-12-16T16:42:05.000Z","size":41,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-29T02:18:26.816Z","etag":null,"topics":["bunyan","debug","file","format","json","log","logging","nodejs","pretty","simple","stream"],"latest_commit_sha":null,"homepage":null,"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/GCSBOSS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2019-09-25T17:58:39.000Z","updated_at":"2021-12-16T16:41:50.000Z","dependencies_parsed_at":"2022-11-01T17:32:49.478Z","dependency_job_id":null,"html_url":"https://github.com/GCSBOSS/golog","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/GCSBOSS/golog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GCSBOSS%2Fgolog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GCSBOSS%2Fgolog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GCSBOSS%2Fgolog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GCSBOSS%2Fgolog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GCSBOSS","download_url":"https://codeload.github.com/GCSBOSS/golog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GCSBOSS%2Fgolog/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260654700,"owners_count":23042680,"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":["bunyan","debug","file","format","json","log","logging","nodejs","pretty","simple","stream"],"created_at":"2025-06-19T00:10:09.293Z","updated_at":"2026-04-16T19:43:58.088Z","avatar_url":"https://github.com/GCSBOSS.png","language":"JavaScript","readme":"# [GoLog](https://gitlab.com/GCSBOSS/golog)\n\nA light-weight stdout logging library for NodeJS and [Deno](https://deno.land). Checkout the main features:\n\n- JSON output by default\n- Automatic readable output format for dev environments\n- Auto-format error, request and repsonse objects.\n- Support for adding custom function to parse interesting input data\n- `printf`-like formatting on messages.\n- Automatic pid field on log entries.\n- Log entries filtering by level or type (whitelist, blacklist)\n\n## Get Started NodeJS\n\n1. Install with: `npm i -P golog`.\n2. Setup a logger:\n\n```js\nconst GoLog = require('require');\n\n// Crate a new logger.\nvar log = new GoLog();\n```\n\n## Get Started [Deno](https://deno.land)\n\n```js\nimport GoLog from 'https://deno.land/x/golog@v0.4.0-0/deno/main.js';\n\n// Crate a new logger.\nvar log = new GoLog();\n```\n\n3. Create new log entries with one of the supported levels:\n\n```js\nlog.debug('Main log message');\nlog.info('Main log message');\nlog.warn('Counting, %d, %d, %d... %s', 1, 2, 3, 'Foo!');\nlog.error('Main log message');\nlog.fatal({ merge: 'this', object: 'with', the: 'entry' }, 'The MSG');\n```\n\n## Other Features\n\nYou can set default properties to show up in every log entry for a given logge rinstance.\nFor exemple we can use it to set a `source`.\n\n```js\nvar l1 = new GoLog({ defaults: { source: 'app-a' } });\nl1.warn('Hey!');\nvar l2 = new GoLog({ defaults: { source: 'app-b' } });\nl2.warn('Ho!');\n```\n\nDefault loggers log entries of any level. Change the level for warn or higher.\n\n```js\nvar log = new GoLog({ level: 'warn' });\nlog.debug('Let\\'s go!');\n```\n\nYou can check/use log entries right off the bat.\n\n```js\nvar log = new GoLog();\n\nlet e1 = log.fatal('foo');\nlet e2 = log.debug('bar');\nconsole.log(e1, e2);\n```\n\nIf you want to log some information about an `Error` instance, just add it as a key to the data object.\n\n```js\nlog.warn({ err: new Error('My error') }, 'The message lives on');\n```\n\nGoLog also formats http request objects.\n\n```js\nconst http = require('http');\nconst GoLog = require('require');\n\nvar log = new GoLog();\n\nvar server = http.createServer(function(req, res){\n    res.end();\n    log.warn({ req }, 'The message lives on');\n}).listen(8765);\n\nhttp.get('http://localhost:8765');\n```\n\nYou can create a disabled logger if you send `false` as the input parameter\n\n```js\nvar log = new GoLog(false);\nlog.info('Wont log this');\n```\n\n## Reporting Bugs\nIf you have found any problems with this module, please:\n\n1. [Open an issue](https://gitlab.com/GCSBOSS/golog/issues/new).\n2. Describe what happened and how.\n3. Also in the issue text, reference the label `~bug`.\n\nWe will make sure to take a look when time allows us.\n\n## Proposing Features\nIf you wish to get that awesome feature or have some advice for us, please:\n1. [Open an issue](https://gitlab.com/GCSBOSS/golog/issues/new).\n2. Describe your ideas.\n3. Also in the issue text, reference the label `~proposal`.\n\n## Contributing\nIf you have spotted any enhancements to be made and is willing to get your hands\ndirty about it, fork us and\n[submit your merge request](https://gitlab.com/GCSBOSS/golog/merge_requests/new)\nso we can collaborate effectively.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcsboss%2Fgolog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgcsboss%2Fgolog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgcsboss%2Fgolog/lists"}