{"id":17647564,"url":"https://github.com/hunteroi/advanced-logger","last_synced_at":"2026-01-19T06:32:40.256Z","repository":{"id":57116846,"uuid":"247383592","full_name":"HunteRoi/advanced-logger","owner":"HunteRoi","description":"My NodeJS logger for a few Discord bots","archived":false,"fork":false,"pushed_at":"2024-04-10T00:56:43.000Z","size":320,"stargazers_count":1,"open_issues_count":6,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T22:07:19.464Z","etag":null,"topics":["javascript","logging","nodejs"],"latest_commit_sha":null,"homepage":"https://hunteroi.github.io/advanced-logger/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/HunteRoi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["hunteroi"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-03-15T01:49:03.000Z","updated_at":"2024-04-10T13:06:26.000Z","dependencies_parsed_at":"2024-10-23T14:09:31.999Z","dependency_job_id":null,"html_url":"https://github.com/HunteRoi/advanced-logger","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HunteRoi%2Fadvanced-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HunteRoi%2Fadvanced-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HunteRoi%2Fadvanced-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/HunteRoi%2Fadvanced-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/HunteRoi","download_url":"https://codeload.github.com/HunteRoi/advanced-logger/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247587518,"owners_count":20962726,"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":["javascript","logging","nodejs"],"created_at":"2024-10-23T11:13:51.744Z","updated_at":"2026-01-19T06:32:40.251Z","avatar_url":"https://github.com/HunteRoi.png","language":"TypeScript","funding_links":["https://github.com/sponsors/hunteroi"],"categories":[],"sub_categories":[],"readme":"# advanced-logger\n\nAdvanced Logger is a logging framework using [Javascript's Console object](https://developer.mozilla.org/en-US/docs/Web/API/Console), [moment](https://www.npmjs.com/package/moment) and [chalk](https://www.npmjs.com/package/chalk) libraries to log strings to your console.\n\n[![npm](https://img.shields.io/npm/v/@hunteroi/advanced-logger.svg)](https://www.npmjs.com/package/@hunteroi/advanced-logger)\n\n## Usage\n\nThis library can be used within Javascript and Typescript applications.\n```ts\n// Javascript\n\nconst { ConsoleLogger } = require('@hunteroi/advanced-logger');\n\nconst log = new ConsoleLogger();\n\n\n// Typescript\n\nimport { ConsoleLogger } from '@hunteroi/advanced-logger';\n\nconst log = new ConsoleLogger();\n```\n\n## Installation\n\n**advanced-logger** can be found on [npm](https://www.npmjs.com/package/@hunteroi/advanced-logger). Run the following:\n    \n    yarn add @hunteroi/advanced-logger\n\n## Configuration\n\n**advanced-logger** provides a constructor with a `LoggerOptions` parameter. It supports the following properties:\n\n| Key                | Type    | Description                                                                                     | Default |\n| ------------------ | ------- | ----------------------------------------------------------------------------------------------- | ------- |\n| `includeTimestamp` | boolean | If `true`, timestamp will be included in the message that is written to the console.            | `false` |\n| `minLevel`         | LogEventLevel  | The minimum level for which events with specified level or higher will be output to the console | `info`  |\n\n```js\nconst log = new ConsoleLogger({ includeTimestamp: true });\n```\n\n### Log Levels\n\nThere are 6 log levels available by default, in addition to a setting to disable logging completely.\nIn decreasing order of severity (with descriptions borrowed from [Seq](https://github.com/serilog/serilog/wiki/Writing-Log-Events#log-event-levels)):\n\n| Label     | Description                                                                                        | Bitfield |\n| --------- | -------------------------------------------------------------------------------------------------- | -------- |\n| `off`     | When the minimum level is set to this, nothing will be logged.                                     | 0        |\n| `fatal`   | Critical errors causing complete failure of the application.                                       | 1        |\n| `error`   | Indicates failures within the application or connected systems.                                    | 3        |\n| `warning` | Indicators of possible issues or service/functionality degradation.                                | 7        |\n| `info`    | Events of interest or that have relevance to outside observers (default).                          | 15       |\n| `debug`   | Internal control flow and diagnostic state dumps to facilitate pinpointing of recognised problems. | 31       |\n| `verbose` | Tracing information and debugging minutiae; generally only switched on in unusual situations.      | 63       |\n\nThe log levels can also be represented as bitfields, and each log level also includes any levels of higher severity.\nFor example, `warning` will also allow events of the `error` level through, but block `info`,\n`debug` and `verbose`.\n\nThe Logger object contains shorthand methods for logging to each level.\n\n```js\nlog.fatal('some fatal logging');\nlog.error('some error logging');\nlog.warn('some warning logging');\nlog.info('some info logging');\nlog.debug('some debug logging');\nlog.verbose('some verbose logging');\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunteroi%2Fadvanced-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhunteroi%2Fadvanced-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhunteroi%2Fadvanced-logger/lists"}