Plain Kotlin Android Style Logging
Plain Kotlin Android Style Logging Overview Android Studio Android Logging for any Kotlin project. Introduction In Android Studio Android projects, most people take advantage of the Android Logging Framework . However, if you write code externally or without that framework available, you would likely write all your output as println and then have to add the proper logging later. Moving the code back and forth would require changes and rewrites. To avoid this, I've put together a small logging class. The Code The code is pretty simple so here is everything: package com.xxxxxxxxxxxxx // https://source.android.com/docs/core/tests/debug/understanding-logging /* RFC 5424 Level RFC 5424 Severity RFC 5424 Description android.util.Log java.util.logging.Level 0 Emergency System is unusable Log.e / Log.wtf SEVERE 1 Alert Action must be taken immediately Log.e / Log.wtf SEVERE 2 Critical Critical conditions Log.e / Log.wtf SEVERE 3 Error Er...