{"id":26510972,"url":"https://github.com/bejasc/drpg-logger","last_synced_at":"2026-04-14T06:32:44.506Z","repository":{"id":65392952,"uuid":"486615353","full_name":"Bejasc/drpg-logger","owner":"Bejasc","description":"Pretty logging for Discord.JS","archived":false,"fork":false,"pushed_at":"2023-07-22T06:11:33.000Z","size":94,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-10T19:41:40.010Z","etag":null,"topics":["discord","logger","logging"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/Bejasc.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-04-28T13:54:46.000Z","updated_at":"2023-07-07T05:35:23.000Z","dependencies_parsed_at":"2025-10-10T19:41:34.684Z","dependency_job_id":"a72cc5f1-6b32-42a1-84e6-acb425b57d2f","html_url":"https://github.com/Bejasc/drpg-logger","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/Bejasc/drpg-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bejasc%2Fdrpg-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bejasc%2Fdrpg-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bejasc%2Fdrpg-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bejasc%2Fdrpg-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bejasc","download_url":"https://codeload.github.com/Bejasc/drpg-logger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bejasc%2Fdrpg-logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31785598,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T02:24:21.117Z","status":"ssl_error","status_checked_at":"2026-04-14T02:24:20.627Z","response_time":153,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["discord","logger","logging"],"created_at":"2025-03-21T02:18:43.974Z","updated_at":"2026-04-14T06:32:44.491Z","avatar_url":"https://github.com/Bejasc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DRPG Logger\n\nPretty logging for Discord.JS\n\n![image](https://cdn.discordapp.com/attachments/964178424258236466/967811840904134726/unknown.png)\n\n![image](https://cdn.discordapp.com/attachments/964178424258236466/967813884264210472/unknown.png)\n\n## What is DRPG Logger?\n\nDRPG Logger is an advanced console and channel logging package for bots created with Discord.JS.\nWith this package, you can quickly print nicely formatted logs to your console, as well as to any discord Channel.\n\nOn top of formatting the logs, any Discord User, Member, or Channel will also be displayed in the console in a nice and easy to read manner (including display name and ID).\nThis is done by default when a `User`, `GuildMember`, or `Channel` is supplied - which when included in a string forms a pattern such as `\u003c@12345678912345678\u003e`.\n\n**NOTE**\nCurrently, this package only supports a single log channel. If your bot is a multi-guild bot (as most are), a log channel per guild is currently not supported.\n\n## Install\n\nRun `npm install drpg-logger`\n\n## Usage\n\n1. Import the module\n\n```ts\nimport { Logger, LogLevel } from \"drpg-logger\";\n```\n\n2. Provide your config in the constructor and access desired functions\n\n```ts\nimport { Client } from \"discord.js\";\nimport { Logger, LogLevel } from \"drpg-logger\";\n\nconst client = new Client({}); // However you are creating your discord Client - this is up to you\n\nconst logChannelId = process.env.LOG_CHANNEL_ID; // However you decide to provide the log channel. Suggested via environment variables.\nconst logger = new Logger(client, { defaultLogChannel: logChannelId, dateDisplayTimezone: \"+1000\" });\n\nclient.once(\"ready\", () =\u003e {\n\tlogger.info(\"Bot has started!\", \"Bot Running\");\n});\n\nclient.login(token);\n```\n\n3. Once initialized, you can use `Logger` to access all of it's static methods. \n```ts\nclient.on('interactionCreate', interaction =\u003e {\n    Logger.debug(`${interaction.user} did some interaction in ${interaction.channel}`,\"Interaction\", interaction.message);\n});\n```\n\n### Suggestions\n\n-   For easy and repeated use, it is suggested that your instance of `logger` is exported, so that you can use the same instance throughout.\n-   This package makes heavy use of the [colorette](https://www.npmjs.com/package/colorette) library. You can use this library with the `content` properties, to further enhance the display of your logs.\n\n### Default Log Types\n\nBy default, a number of log types are included. All of these can be quickly used by calling `Logger.trace`, `Logger.info`, `Logger.warn` and so on.\n\n-   `trace` (Priority `10`)\n-   `debug` (Priority `20`)\n-   `info` (Priority `30`)\n-   `warn` (Priority `40`)\n-   `error` (Priority `50`)\n-   `fatal` (Priority `60`)\n\n## Configuration\n\nAll configuration is done via the `ILoggerOptions`, which is passed in at the time of creation.\n\n-   `defaultLogChannel` Required. The Channel that will be used for sending Log embeds.\n-   `allowEmbedLevel` Optional. Defaults to `30`. Each LogType has a Priority. If a new log has _less_ than this level of priority, the Embed will not be sent.\n-   `allowLogLevel` Optional. Defaults to `10`. Each LogType has a priority. If a new log has _less_ than this level of priority, the console log will not be sent.\n-   `dateDisplayTimezone` Optional. Defaults to `0`. Must be procided as a UTC Offset ie `+1030` for UTC+10:30. Will change the date used for logging.\n-   `dateFormat` Optional. Defaults to `YYYY-MM-DD HH:mm:ss`. Will be included in all console logs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbejasc%2Fdrpg-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbejasc%2Fdrpg-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbejasc%2Fdrpg-logger/lists"}