{"id":18508539,"url":"https://github.com/roundedinfinity/clever_logger","last_synced_at":"2025-05-14T09:35:46.316Z","repository":{"id":63096615,"uuid":"565249248","full_name":"RoundedInfinity/clever_logger","owner":"RoundedInfinity","description":"An extendable logger library with colorful prints for dart and flutter.","archived":false,"fork":false,"pushed_at":"2023-04-30T09:43:05.000Z","size":42,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-17T02:19:23.321Z","etag":null,"topics":["dart","logger","logging","logging-library","print"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/RoundedInfinity.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":"2022-11-12T19:54:13.000Z","updated_at":"2022-11-13T11:30:20.000Z","dependencies_parsed_at":"2023-01-21T18:19:26.369Z","dependency_job_id":null,"html_url":"https://github.com/RoundedInfinity/clever_logger","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/RoundedInfinity%2Fclever_logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoundedInfinity%2Fclever_logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoundedInfinity%2Fclever_logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/RoundedInfinity%2Fclever_logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/RoundedInfinity","download_url":"https://codeload.github.com/RoundedInfinity/clever_logger/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254112950,"owners_count":22016874,"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":["dart","logger","logging","logging-library","print"],"created_at":"2024-11-06T15:14:41.332Z","updated_at":"2025-05-14T09:35:46.215Z","avatar_url":"https://github.com/RoundedInfinity.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Clever Logger\n\n[![style: very good analysis][very_good_analysis_badge]][very_good_analysis_link]\n[![Powered by Mason](https://img.shields.io/endpoint?url=https%3A%2F%2Ftinyurl.com%2Fmason-badge)](https://github.com/felangel/mason)\n[![License: MIT][license_badge]][license_link]\n![Coverage](./coverage_badge.svg)\n\nAn extendable logger library with colorful prints.\n\n## Basic Usage 🚀\n\nYou can log messages with different levels of severity.\n\nThe default levels are the following:\n\n- fine\n- info\n- config\n- warning\n- shout\n\nTo log a message at level info with the default logger:\n\n```dart\nlogInfo('Hello there!');\n```\n\nThis prints this message to the console.\n\u003e [Logger - INFO] Hello there!\n\nCreate a logger and use it to log messages.\n\n```dart\nfinal logger = CleverLogger('Test Logger');\n// now you can use this logger\nlogger.logFine('Hello there!');\n```\n\n## Advanced Usage 🧪\n\n### Log Actions\n\nLog actions are responsible for what happens with the logs (for example storing them in a file or sending them to your analytics service).\n\nThe `LogRecords` are passed to the actions in order. By default, the logger uses a `ColorfulPrintAction` as its default action, which is responsible for colorful outputs to the console.\n\n```dart\nfinal otherLogger = CleverLogger(\n  'Other Logger',\n  logActions: [\n    // The default colorful console output.\n    ColorfulPrintAction(),\n    // A custom action\n    MyLogAction(),\n  ],\n);\n```\n\nLog actions can also be configured to only run for logs with a certain level.\n\n```dart\nclass MyLogAction extends LogAction {\n  @override\n  Level get level =\u003e Level.INFO;\n\n  @override\n  void onRecord(LogRecord record) {\n    //This is only executed for logs with a level \u003e= Level.info\n    print('${record.loggerName} has a log with ${record.level}');\n  }\n}\n```\n\n### Extending functionality\n\nYou can write extension methods to extend the loggers functionality.\nAdditional values can be stored in the `value` variable of the logger.\n\nBy default, the logger has a **Stopwatch** integrated as an extension.\n\nSee the [example](https://github.com/RoundedInfinity/clever_logger/blob/main/example/bin/extension.dart) for more information.\n\n### Custom Printer\n\nExtend the `ColorfulPrintAction` and override the default print functions, like `printInfo`, `printWarning` etc. for custom-styled print messages.\n\nYou can use the [ansicolor](https://pub.dev/packages/ansicolor) plugin for colorful prints.\n\n[license_badge]: https://img.shields.io/badge/license-MIT-blue.svg\n[license_link]: https://opensource.org/licenses/MIT\n[very_good_analysis_badge]: https://img.shields.io/badge/style-very_good_analysis-B22C89.svg\n[very_good_analysis_link]: https://pub.dev/packages/very_good_analysis\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froundedinfinity%2Fclever_logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froundedinfinity%2Fclever_logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froundedinfinity%2Fclever_logger/lists"}