{"id":26558564,"url":"https://github.com/ech0s7r/androidlog","last_synced_at":"2026-05-06T18:31:31.723Z","repository":{"id":57718974,"uuid":"104195368","full_name":"ech0s7r/androidlog","owner":"ech0s7r","description":"A simple and lightweight android logger library","archived":false,"fork":false,"pushed_at":"2020-03-10T14:22:35.000Z","size":338,"stargazers_count":0,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-08T06:09:19.907Z","etag":null,"topics":["android","crash-reporting","extendable","file","java","kotlin","library","lint","logcat","logger","pretty-logger"],"latest_commit_sha":null,"homepage":null,"language":"Java","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/ech0s7r.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}},"created_at":"2017-09-20T09:33:48.000Z","updated_at":"2025-01-12T10:32:05.000Z","dependencies_parsed_at":"2022-08-27T20:03:53.711Z","dependency_job_id":null,"html_url":"https://github.com/ech0s7r/androidlog","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ech0s7r/androidlog","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ech0s7r%2Fandroidlog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ech0s7r%2Fandroidlog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ech0s7r%2Fandroidlog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ech0s7r%2Fandroidlog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ech0s7r","download_url":"https://codeload.github.com/ech0s7r/androidlog/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ech0s7r%2Fandroidlog/sbom","scorecard":{"id":365034,"data":{"date":"2025-08-11","repo":{"name":"github.com/ech0s7r/androidlog","commit":"7674be61732d13e364894e33b5294efd416095c4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: gradle/wrapper/gradle-wrapper.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-18T11:40:10.534Z","repository_id":57718974,"created_at":"2025-08-18T11:40:10.534Z","updated_at":"2025-08-18T11:40:10.534Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274113416,"owners_count":25224405,"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-07T02:00:09.463Z","response_time":67,"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","crash-reporting","extendable","file","java","kotlin","library","lint","logcat","logger","pretty-logger"],"created_at":"2025-03-22T12:50:16.300Z","updated_at":"2026-05-06T18:31:26.701Z","avatar_url":"https://github.com/ech0s7r.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Android Logger Library\n\u003c!--[![Build Status](https://travis-ci.com/ech0s7r/androidlog.svg?token=q5qvypmqcQbJyarCtzpo\u0026branch=master)](https://travis-ci.com/ech0s7r/androidlog)--\u003e\n[ ![Download](https://api.bintray.com/packages/ech0s7r/Android-Lib/androidlog/images/download.svg?version=1.2.11) ](https://bintray.com/ech0s7r/Android-Lib/androidlog/1.2.10/link)\n\n\u003c!--![logcat example](art/rat_alpha.png)--\u003e\n\nLogger library created for simple integration of logger capability to android applications providing APIs to write logs with different level of verbosity and avoiding to write boilerplate code like declaring TAG for each class or use static functions to get the logger instance every time as implemented in the most logger library on the market. This library makes the logger process simple to use, pretty and powerful. \n\nThe library is distributed as Android Studio project named *loggerlib* that depends on the module *lintrules*.\n\nThe order in terms of verbosity, from the least to the most is: ASSERT, ERROR, WARN, INFO, DEBUG and VERBOSE. Verbose and Debug should never be used in production. Assert should be used only to log error that should never happens (eg. App crash).  \n\n\n\n### Features\n\n- Minimum performance impact\n- Logcat integration\n- Log file writing\n- File rotation\n- CSV format output\n- Editable current timestamp\n- Crash system detection\n- Compile time correctness detection\n- Log level supports\n- String format args\n- Customizable *Layout* and *Appenders*\n\n\n### (optional) Log in a dedicated process\n\nThe library is fully thread-safe, it can be configured for creating a separate process for the logger and communicate with it over AIDL, each library function returns immediately to the caller and the file writing is managed in a separate process with a MIN PRIORITY daemon thread. \n\n\n\n### Download\n\nRepository available on [jCenter](http://jcenter.bintray.com/com/ech0s7r/android/loggerlib/) and [Bintray](https://bintray.com/ech0s7r/Android-Lib/androidlog)\n\nIn your build.gradle, add:\n\n```\nimplementation 'com.ech0s7r.android:loggerlib:1.2.11'\n```\n\n\u003c!--If the dependency fails to resolve, add this to your project repositories \n\n```\nrepositories {\n    maven {\n        url  \"https://dl.bintray.com/ech0s7r/Android-Lib\"\n    }\n}\n```\n\n[Find me on Bintray](https://bintray.com/ech0s7r/Android-Lib/androidlog)\n--\u003e\n\n### *[Optional] Enable text report*\n\nIf you wish to enable the text report, add the following in your app module build.gradle:\n\n```groovy\nlintOptions {\n    textReport true\n    textOutput 'stdout'\n}\n```\n\u003c!--checkReleaseBuilds true\n    abortOnError true\n    ignoreWarnings true\n    check 'AndroidLogDetector', 'SystemOutDetector', 'PrintStackTraceDetector', 'NoLoggedException', 'MissingSuperCall'\n    fatal 'AndroidLogDetector', 'SystemOutDetector', 'PrintStackTraceDetector', 'NoLoggedException', 'MissingSuperCall'\n    htmlOutput file(\"$project.buildDir/reports/lint/lint-result.html\")\n    htmlReport true\n--\u003e\n\n### Setting up\n\n1. Add *loggerlib* library into the project\n\n2. Initialize the logger using the LoggerConfigurator class \n\n   ```java\n   LoggerConfigurator.init(\n         Logger.Level.WARN,        /* Minimum level to log */\n         123,                      /* Application ID */\n         \"MyApp\",                  /* Application name */\n         BuildConfig.VERSION_NAME, /* Application version */\n         getDeviceId(),            /* Device ID */\n         \"MyAppAndroid.log\");      /* File name prefix */\n   ```\n\n3. Add *Layouts* with *Appenders*\n\n   ```java\n   LoggerConfigurator.addAppender(new LogcatAppender(new LogcatLayout()));\n   LoggerConfigurator.addAppender(new FileAppender(getApplicationContext(), new CsvLayout()));\n   ```\n\n   The supported appenders, for now, are writing on Logcat and writing on File with Csv layout and Logcat layout.\n\n\n\n### How to use\n\nThe Logger usage is pretty simple, all that you need is to call the right static method from the Logger class, as following:\n\n##### Verbose\n\n```java\nLogger.v(\"verbose\");\n```\n##### Debug\n```java\nLogger.d(\"debug\");\n```\n\n##### Info\n```java\nLogger.i(\"info\");\n```\n\n##### Warning\n```java\nLogger.w(\"warning\");\n```\n\n##### Error\n```java\nLogger.e(\"error\");\n```\n\n##### Wtf\n```java\nLogger.wtf(\"What a Terrible Failure\");\n```\n\n##### String format arguments are supported\n```java\nLogger.w(\"Hello %s %d\", \"world\", 1);\n```\n\n##### How to log Exceptions\n```java\ntry {\n    ...\n} catch (Exception e){\n   Logger.e(e);\n   // or\n   Logger.e(\"description\", e);\n}\n```\n\n\n\n### Compilation time check (Lint integration)\n\nThe library implements 4 kinds of custom Lint rules to avoid common error and promote the usage of this library instead of the android built-in logger library. These rules are checked at compile time and if not respected an error will be generated during the build process. The Lint scanning tools, in case of build error, generate an HTML file that can be controlled to see where the following rules are not observed.\n\n- ##### SystemOutDetector\n\n  All the usages of the System.out.print/ln() or System.err.print/ln() are forbidden.\n\n- ##### PrintStackTraceDetector\n\n  The usage of Throwable.printStackTrace() is forbidden, see How to log Exception.\n\n- ##### AndroidLogDetector\n\n  The usage of android.utils.Log is forbidden\n\n- ##### NoLoggedException\n\n  Every Exception should be logged\n\n\n\n### Customization\n\nNew *Appenders* and *Layout*s can be added by developers, extending the *LogAppender* and *LogLayout* classes. \n\nNew Lint rules are more than welcome and can be added in the *lintrules* module.\n\n\n\n### Ouptut\n\n##### Logcat\n\n![logcat example](art/logcat_example.PNG)\n\nEach line logged on Android logcat contains the following elements:\n\n1. Date and Time\n2. Process ID\n3. App package\n4. Log level\n5. Thread ID\n6. Class.Method (File name : code line)\n7. Message\n\n##### File\n\nThe log files are stored into the sd-card in a new directory with the same name of the application, into the folder “logs”. The file name is generated adding the current date (format yyyyMMdd) to file prefix used during the logger configuration.\n\n*Example:*\nIf the application name is MyApp and the file prefix is MyAppAndroid.log, the generated files are: \n\n\u003e ​\t…\n\u003e\n\u003e ​\t/sdcard/logs/MyApp/MyAppAndroid.log20170803\n\u003e\n\u003e ​\t/sdcard/logs/MyApp/MyAppAndroid.log20170804\n\u003e\n\u003e ​\t…\t\n\n![file_example](art/file_example.PNG)\n\n\n\u003c!--\n##### **The CSV layout used is the following:**\n\nEach line has same number of elements comma separated, following elements are now supported and logged:\n\n1. Timestamp (in the format yyyy-MM-dd hh:MM:ss.SSS)\n2. Log level (String)\n3. App version (String)\n4. Company ID (Integer)\n5. Device code (String) \n6. Device Manufacturer (String)\n7. Device Board (String)\n8. SDK Version (Integer)\n9. Process ID (Integer)\n10. Thread ID (Integer)\n11. Class name (String)\n12. Method name (String)\n13. File name (String)\n14. Line number (Integer)\n15. Description(String)\n16. Stack Trace (String, optional) \n--\u003e\n\nLicense\n-------\n\n    Copyright 2012 ech0s7r\n\n    Licensed under the Apache License, Version 2.0 (the \"License\");\n    you may not use this file except in compliance with the License.\n    You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing, software\n    distributed under the License is distributed on an \"AS IS\" BASIS,\n    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n    See the License for the specific language governing permissions and\n    limitations under the License.\n    \n  \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fech0s7r%2Fandroidlog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fech0s7r%2Fandroidlog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fech0s7r%2Fandroidlog/lists"}