{"id":26285675,"url":"https://github.com/tans5/tlog","last_synced_at":"2025-09-17T20:40:38.923Z","repository":{"id":281821232,"uuid":"946475951","full_name":"Tans5/tLog","owner":"Tans5","description":"A log library for Android.","archived":false,"fork":false,"pushed_at":"2025-03-20T06:57:38.000Z","size":138,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-20T07:37:18.881Z","etag":null,"topics":["android-lib","logger"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/Tans5.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2025-03-11T07:44:43.000Z","updated_at":"2025-03-20T06:49:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"3b468405-77da-4a87-a32e-4a23ad1eec40","html_url":"https://github.com/Tans5/tLog","commit_stats":null,"previous_names":["tans5/tlog"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Tans5/tLog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tans5%2FtLog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tans5%2FtLog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tans5%2FtLog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tans5%2FtLog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Tans5","download_url":"https://codeload.github.com/Tans5/tLog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Tans5%2FtLog/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":275658802,"owners_count":25504780,"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","status":"online","status_checked_at":"2025-09-17T02:00:09.119Z","response_time":84,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android-lib","logger"],"created_at":"2025-03-14T19:35:51.604Z","updated_at":"2025-09-17T20:40:38.915Z","avatar_url":"https://github.com/Tans5.png","language":"Kotlin","readme":"\nA log library for Android. \n\n## Installation\n\nAdd the dependency to your build.gradle:\n```Groovy\ndependencies {\n\t // ...\n    implementation 'io.github.tans5:tlog:1.0.0'\n    // ...\n}\n```\n\n## Usage\n\n### Initialization\n```Kotlin\nval log = tLog.Companion.Builder(\n    // Required: Directory to store log files\n    File(application.externalCacheDir, \"AppLog\")\n)\n    // Configure basic parameters (with default values):\n    .setMaxSize(1024L * 1024L * 30L) // Maximum total log size (default = 30MB)\n    .setLogFilterLevel(LogLevel.Debug) // // Minimum severity level to record\n    .setBackgroundThread(HandlerThread(\"LogThread\")) // Dedicated I/O thread\n    .setLogToBytesConverter(CustomEncryptor()) // Add encryption layer\n    .setInitCallback(object : InitCallback {\n        override fun onSuccess() {\n            /* Ready for logging */\n        }\n        override fun onFail(e: Throwable) {\n            /* Handle failure */\n        }\n    }) // Track initialization status\n    .build()\n```\n\n### Basic Logging\n```Kotlin\nlog.d(TAG, \"Debug\")\nlog.i(TAG, \"Info\")\nlog.w(TAG, \"Waring\")\nlog.e(TAG, \"Error\", Throwable(\"TestError\"))\n```\n\n### Maintenance Operations\n```Kotlin\n// Ensure all buffered logs are persisted\nlog.flush() \n\n// Create compressed archive (ideal for uploads)\nlog.zipLogFile(outputFile = File(\"logs.zip\"))\n\n// Remove all log files\nlog.deleteAllLogs()\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftans5%2Ftlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftans5%2Ftlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftans5%2Ftlog/lists"}