Android Log wrapper with handy DSL(with extra features like line dividers) and control of message size, internal StringBuilder pool for memory pollution minimization
For the sake of the smooth migration, there are all the methods of the original Log class such as
Log.d(tag, message, throwable)
and so on.
So, for quick migration replace all import android.util.Log;
to import me.shikhov.wlog.Log;
and all must work as before.
But remember if a string concatenation is used in such methods it should be replaced with a()
(shortcut to append) calls
Also log builder is available as function block via: Log(tag) { -log actions here- }
Library is in mavenCentral
repository, so you only need to declare it in dependencies in your build.gradle
for groovy or build.gradle.kts
for kotlin dsl build scripts
// groovy
dependencies {
implementation 'me.shikhov:wlog:3.5.0'
}
// kotlin
dependencies {
implementation("me.shikhov:wlog:3.5.0")
}
WILL BE UPDATED SOON
For now see examples
When I thought about name,I decided to use log with one char prefix for simplicity. Some goals were to not intersect with already existed log libraries and to find some cool abbreviation which has meaning. I found it, and this is mathematical "without loss of generality", so I stopped here :)
Copyright 2021 Andrew Shikhov
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.