{"id":17463891,"url":"https://github.com/linxunfeng/alog","last_synced_at":"2025-04-19T18:51:32.084Z","repository":{"id":56825860,"uuid":"274863518","full_name":"LinXunFeng/alog","owner":"LinXunFeng","description":"Flutter打印工具","archived":false,"fork":false,"pushed_at":"2022-03-06T12:07:11.000Z","size":292,"stargazers_count":21,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T11:51:42.727Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","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/LinXunFeng.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":"2020-06-25T08:17:07.000Z","updated_at":"2024-12-22T10:56:25.000Z","dependencies_parsed_at":"2022-08-27T02:57:10.463Z","dependency_job_id":null,"html_url":"https://github.com/LinXunFeng/alog","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinXunFeng%2Falog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinXunFeng%2Falog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinXunFeng%2Falog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LinXunFeng%2Falog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LinXunFeng","download_url":"https://codeload.github.com/LinXunFeng/alog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249769675,"owners_count":21323067,"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":[],"created_at":"2024-10-18T10:44:04.218Z","updated_at":"2025-04-19T18:51:32.052Z","avatar_url":"https://github.com/LinXunFeng.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## 功能\n\u003e 像原生开发一样，输出打印调试所需的相关信息，便于开发调试！\n- 输出 内容\n- 输出 所在文件\n- 输出 所在行\n- 输出 所在列\n- 仅在非 `Release` 模式下输出打印内容\n\n\n## 效果\n\n![](./some_asset/display.png)\n\n## 安装\n\n`pubspec.yaml` 中添加依赖\n\n```yaml\ndependencies:\n  alog: $latest_version\n```\n\n\n\n## 使用\n\n导包\n\n```dart\nimport 'package:alog/alog.dart';\n```\n\n\n\n```dart\n// 直接使用aALog\nALog(\"flutter_log demo\");\n\n// mode：打印模式（默认值为debug）\nALog(\"flutter_log demo\", mode: ALogMode.error);\n```\n\n`mode` 枚举如下：\n\n```dart\nenum ALogMode {\n  debug,    // 💚 DEBUG\n  warning,  // 💛 WARNING\n  info,     // 💙 INFO\n  error,    // ❤️ ERROR\n}\n```\n\n\n## 其它说明\n\n源码中使用的 `Chain` 需要导包 `import 'package:stack_trace/stack_trace.dart';`\n\n这个 `stack_trace` 在 `Flutter` 下自动集成，而纯 `Dart` 下没有，如果想在纯 `Dart` 下使用该功能，只需要如下添加依赖即可。\n\n```yaml\ndependencies:\n  stack_trace: ^1.10.0\n```\n\n## 相关文章\n\n[Flutter - 打印好用的Debug日志](https://juejin.cn/post/6844904199558283271) -- [【个人博客】](https://linxunfeng.top/2020/06/26/flutter/flutter%20-%20打印好用的debug日志/)\n[【掘金】](https://juejin.cn/post/6844904199558283271)\n[【全栈行动】](https://fullstackaction.com/pages/a9e62e/)\n\n## Author\n\n- LinXunFeng\n- email: [linxunfeng@yeah.net](mailto:linxunfeng@yeah.net)\n- Blogs: [全栈行动](https://fullstackaction.com/) | [LinXunFeng‘s Blog](http://linxunfeng.top/)  | [掘金](https://juejin.im/user/58f8065e61ff4b006646c72d/posts) \n\n\u003cimg height=\"267.5\" width=\"481.5\" src=\"https://github.com/LinXunFeng/LinXunFeng/raw/master/static/img/FSAQR.png\" /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinxunfeng%2Falog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinxunfeng%2Falog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinxunfeng%2Falog/lists"}