{"id":18410683,"url":"https://github.com/swanx1/logerian","last_synced_at":"2026-04-02T03:11:00.856Z","repository":{"id":40332030,"uuid":"380505933","full_name":"SwanX1/logerian","owner":"SwanX1","description":"Logerian is a quick and dirty logging utility.","archived":false,"fork":false,"pushed_at":"2023-07-19T03:04:25.000Z","size":778,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-24T16:05:55.417Z","etag":null,"topics":["color","colored","colour","coloured","eslint","hacktoberfest","javascript","jest","logger","logging","node","nodejs","ts-jest","tslint","typescript"],"latest_commit_sha":null,"homepage":"https://cernavskis.dev/docs/logerian","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SwanX1.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"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}},"created_at":"2021-06-26T13:16:25.000Z","updated_at":"2022-01-07T21:11:09.000Z","dependencies_parsed_at":"2024-11-06T03:34:29.429Z","dependency_job_id":"5e9599cd-f612-4cb5-a353-2718cd888b75","html_url":"https://github.com/SwanX1/logerian","commit_stats":{"total_commits":41,"total_committers":1,"mean_commits":41.0,"dds":0.0,"last_synced_commit":"e915ebd8b64ce6e3137ebafe08d9528fa6439237"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwanX1%2Flogerian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwanX1%2Flogerian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwanX1%2Flogerian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SwanX1%2Flogerian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SwanX1","download_url":"https://codeload.github.com/SwanX1/logerian/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239092738,"owners_count":19580214,"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":["color","colored","colour","coloured","eslint","hacktoberfest","javascript","jest","logger","logging","node","nodejs","ts-jest","tslint","typescript"],"created_at":"2024-11-06T03:33:25.316Z","updated_at":"2025-10-14T19:13:34.577Z","avatar_url":"https://github.com/SwanX1.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eLogerian\u003c/h1\u003e\n\n### Description\nLogerian is a logging utility made by [me](https://github.com/SwanX1)!\nI made this logging utility mainly because I am too dumb to understand other loggers like [winston](https://www.npmjs.com/package/winston) and [signale](https://www.npmjs.com/package/signale).\nIf you're willing to contribute, please read [CONTRIBUTING.md](./CONTRIBUTING.md).\n\n### Demo\n![GIF of library in action](./demo.gif)\n\n### Usage\nTo use this logger, you can simply just create a new logger instance and it'll work.\nIt uses default options, which is the built-in `coloredLog` prefix, routing log levels correctly to stdout and stderr respectively:\n```typescript\nimport { Logger } from \"logerian\"; // ES import\nconst { Logger } = require(\"logerian\"); // CJS import\n\nconst logger = new Logger();\n\nlogger.info(\"Hello World!\");\n// Output: [17:43:01] [INFO] Hello World!\n```\n\nBy default, the logger adds a prefix with a timestamp and log level as shown in the example code above.\nIf you wish to change that, you'll have to define a stream when you create the logger.\n```typescript\nconst logger = new Logger({\n  streams: [\n    {\n      stream: process.stdout,\n    },\n  ],\n});\n\nlogger.info(\"foobar\");\n// Output: foobar\n```\n\nA logger can utilize multiple output streams:\n```typescript\nconst logger = new Logger({\n  streams: [\n    {\n      stream: process.stdout,\n    },\n    {\n      stream: fs.createWriteStream(\"log.txt\"),\n    },\n  ],\n});\n\nlogger.info(\"Iron Man dies in Endgame\");\n// Output: Iron Man dies in Endgame\nlogger.info(\"Steve Rogers is old!!\");\n// Output: Steve Rogers is old!!\n```\n```conf\n# log.txt\nIron Man dies in Endgame\nSteve Rogers is old!!\n```\n\nThere's also a neat thing called log levels!\n```typescript\nimport { Logger, LoggerLevel } from \"logerian\";\nconst { Logger, LoggerLevel } = require(\"logerian\");\n\nconst logger = new Logger({\n  streams: [\n    {\n      level: LoggerLevel.WARN,\n      stream: process.stdout,\n    },\n    {\n      level: LoggerLevel.DEBUG, // Debug level is default\n      stream: fs.createWriteStream(\"log.txt\"),\n    }\n  ],\n});\n\n// Logs to both - stdout and log.txt\nlogger.error(\"Uh oh! There's an error!\");\n\n// Logs only to log.txt\nlogger.debug(\"By the way, there's an error because your code sucks!\");\n```\n\nIf you want to use pinned lines (as they're called in code), just use `logger.createPinnedLine`. The rest should be pretty easy to understand from the documentation\n\nFor advanced users, view the [JSDocs](https://swanx1.github.io/logerian).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswanx1%2Flogerian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fswanx1%2Flogerian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fswanx1%2Flogerian/lists"}