{"id":20806872,"url":"https://github.com/link-society/easylog","last_synced_at":"2026-05-25T06:04:55.678Z","repository":{"id":36964711,"uuid":"344299190","full_name":"link-society/easylog","owner":"link-society","description":"Simple and minimalist logging library","archived":false,"fork":false,"pushed_at":"2022-12-08T07:05:21.000Z","size":138,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-19T01:49:37.023Z","etag":null,"topics":["logging","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/link-society.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-03-04T00:08:35.000Z","updated_at":"2021-06-18T08:25:19.000Z","dependencies_parsed_at":"2023-01-17T09:03:59.872Z","dependency_job_id":null,"html_url":"https://github.com/link-society/easylog","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/link-society%2Feasylog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/link-society%2Feasylog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/link-society%2Feasylog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/link-society%2Feasylog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/link-society","download_url":"https://codeload.github.com/link-society/easylog/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243152875,"owners_count":20244657,"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":["logging","typescript"],"created_at":"2024-11-17T19:27:58.627Z","updated_at":"2025-12-25T06:51:18.920Z","avatar_url":"https://github.com/link-society.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# easylog\n\nEasyLog is a very simple and minimalist logging library. It exists because this\ncode was copied/pasted in almost every project we maintain.\n\n## Installation\n\n```\n$ yarn add @link-society/easylog\n```\n\n## Usage\n\n**In TypeScript:**\n\n```typescript\nimport logging, { LogLevel } from '@link-society/easylog'\n\nlogging.configure({\n  level: LogLevel.Info\n})\n\nlogging.debug({ foo: 'bar' }) // will not be printed\nlogging.info({ foo: 'bar' })  // will be printed\n```\n\n**In NodeJS:**\n\n```javascript\nconst { default: logging, LogLevel } = require('@link-society/easylog')\n\nlogging.configure({\n  level: LogLevel.Info\n})\n\nlogging.debug({ foo: 'bar' }) // will not be printed\nlogging.info({ foo: 'bar' })  // will be printed\n```\n\n## API\n\nThe methods `debug`, `info` and `warn` accepts a `LogRecord` object, it is an\nobject whose properties are either a `string`, a `number` or a `boolean`.\n\nThe method `error` accepts an `Error` object and and will generate the\n`LogRecord` object.\n\nThe method `configure` accepts an object with the following properties:\n\n| Name | Type | Description |\n|---|---|---|\n| `level` | `Optional\u003cLogLevel\u003e` | Minimum logging level required to be written to the output |\n| `writer` | `Optional\u003cLogWriter\u003e` | Object used to write the output (example: `console`) |\n| `processor` | `Optional\u003cLogProcessor\u003e` | Function used to transform the log record before writing it |\n| `errorProcessor` | `Optional\u003cErrorProcessor\u003e` | Function used to generate the log record from an error |\n\n## License\n\nThis library is released under the terms of the [MIT License](./LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flink-society%2Feasylog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flink-society%2Feasylog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flink-society%2Feasylog/lists"}