{"id":19610370,"url":"https://github.com/yungzhu/let_log","last_synced_at":"2025-04-27T21:31:38.725Z","repository":{"id":38197461,"uuid":"272433825","full_name":"yungzhu/let_log","owner":"yungzhu","description":"LetLog is a Flutter log system that supports both IDE and in-app display, and supports log and network","archived":false,"fork":false,"pushed_at":"2022-06-09T10:42:50.000Z","size":1150,"stargazers_count":48,"open_issues_count":7,"forks_count":23,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-05T03:41:24.409Z","etag":null,"topics":["console","dart","flutter","log","logger","logging"],"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/yungzhu.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-15T12:33:27.000Z","updated_at":"2025-01-16T01:31:10.000Z","dependencies_parsed_at":"2022-09-10T05:22:13.258Z","dependency_job_id":null,"html_url":"https://github.com/yungzhu/let_log","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/yungzhu%2Flet_log","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yungzhu%2Flet_log/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yungzhu%2Flet_log/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yungzhu%2Flet_log/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yungzhu","download_url":"https://codeload.github.com/yungzhu/let_log/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251212017,"owners_count":21553390,"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":["console","dart","flutter","log","logger","logging"],"created_at":"2024-11-11T10:28:53.556Z","updated_at":"2025-04-27T21:31:38.220Z","avatar_url":"https://github.com/yungzhu.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"# let_log\n\nLetLog is a logger that supports both IDE and in-app display, and supports log and network\n\nLanguage: [English](README.md) | [中文简体](README_ZH.md)\n\n## Getting Started\n\nAPI inspired by web\n\n**Example code**\n\n```dart\n// log\nLogger.log(\"this is log\");\n\n// debug\nLogger.debug(\"this is debug\", \"this is debug message\");\n\n// warn\nLogger.warn(\"this is warn\", \"this is a warning message\");\n\n// error\nLogger.error(\"this is error\", \"this is a error message\");\n\n// test error\ntry {\n  final test = {};\n  test[\"test\"][\"test\"] = 1;\n} catch (a, e) {\n  Logger.error(a, e);\n}\n\n// time test\nLogger.time(\"timeTest\");\nLogger.endTime(\"timeTest\");\n\n// log net work\nLogger.net(\n  \"api/user/getUser\",\n  data: {\"user\": \"yung\", \"pass\": \"xxxxxx\"},\n);\nLogger.endNet(\n  \"api/user/getUser\",\n  data: {\n    \"users\": [\n      {\"id\": 1, \"name\": \"yung\", \"avatar\": \"xxx\"},\n      {\"id\": 2, \"name\": \"yung2\", \"avatar\": \"xxx\"}\n    ]\n  },\n);\n\n// log net work\nLogger.net(\"ws/chat/getList\", data: {\"chanel\": 1}, type: \"Socket\");\nLogger.endNet(\n  \"ws/chat/getList\",\n  data: {\n    \"users\": [\n      {\"id\": 1, \"name\": \"yung\", \"avatar\": \"xxx\"},\n      {\"id\": 2, \"name\": \"yung2\", \"avatar\": \"xxx\"}\n    ]\n  },\n);\n\n// clear log\n// Logger.clear();\n```\n\n\u003e For a detailed example, please refer to [here](example/lib/main.dart).\n\n**IDE Display results**\n\n![Let Log](images/ide.png)\n\n**Display logs in the app**\n\n```dart\nWidget build(BuildContext context) {\n  return Logger();\n}\n```\n\n\u003e For a detailed example, please refer to [here](example/lib/main.dart).\n\n**App log**\n\n![Let Log](images/log.png)\n\n**App network**\n\n![Let Log](images/net.png)\n\n**App search**\n\n![Let Log](images/search.png)\n\n**Setting**\n\nCustom category names\n\n```dart\n// setting\nLogger.enabled = false;\nLogger.config.maxLimit = 50;\nLogger.config.reverse = true;\nLogger.config.printLog = false;\nLogger.config.printNet = false;\n\n// Set the names in ide print, can use emoji.\nLogger.config.setPrintNames(\n  log: \"[😄Log]\",\n  debug: \"[🐛Debug]\",\n  warn: \"[❗Warn]\",\n  error: \"[❌Error]\",\n  request: \"[⬆️Req]\",\n  response: \"[⬇️Res]\",\n);\n\n// Set the names in the app, can use emoji.\nLogger.config.setTabNames(\n  log: \"😄\",\n  debug: \"🐛\",\n  warn: \"❗\",\n  error: \"❌\",\n  request: \"⬆️\",\n  response: \"⬇️\",\n);\n```\n\nResults:\n\n![Let Log](images/name.png)\n\n## Feature\n\n-   [x] Support for both IDE printing and in-app presentation\n\n-   [x] Also supports logging, error, time statistics, network and other information output.\n\n-   [x] Interface imitates the web console class, providing log, debug, warn interface, error, time, endTime, net, endNet, etc.\n\n-   [x] Support for filtering log content by category\n\n-   [x] Support for filtering log content by keywords\n\n-   [x] Support for copy log content\n\n-   [x] Serves as both Http and Socket\n\n-   [x] Statistics for network support packet size, duration\n\n-   [x] Support for custom log category symbols, you can use emoji sentiment as a sort if you like.\n\n-   [x] Multi-colored output logs within the app to make error logs more visible\n\n-   [x] Support for automatic switching between black and white skin according to the app\n\n-   [x] Support for some custom logging settings\n\n## github\n\n\u003e [https://github.com/yungzhu/let_log](https://github.com/yungzhu/let_log)\n\nIf you like it, give it a star, thanks.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyungzhu%2Flet_log","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyungzhu%2Flet_log","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyungzhu%2Flet_log/lists"}