Logger is a simple logging library for Android which allows you to send log to anywhere for instance like logcat, file, crashlytics or server.
- Logging
- Easy customization
- File logging by default implemented.
Use below function to initialize the logger and LoggerBuilder
to customize the logger.
fun initialize( context: Context, builder: LoggerBuilder, handler: Thread.UncaughtExceptionHandler? )
This class should be used for customizing the logger.
Currently, Logger support filtering based on Tags, priority Customization Properties:
Multiple tags can be provided and logger will print only those tags.
If not set all logs will be printed.
Multiple priorities can be provided and logger will print only those priorities.
If not set all logs will be printed.
WTF = 7
DEBUG = 3
ERROR = 6
INFO = 4
VERBOSE = 2
WARN = 5
Boolean to enable/disable file logging. By default, file logging is enabled.
- Message:
Logger.d("Logger")
- With Tag and Message:
Logger.d("TAG","Logger")
- With Tag and Exception:
Logger.d("TAG","Logger", Exception("Sample"))
- Exception: Logger.d(Exception("Sample"))
Timber : com.jakewharton.timber:timber:4.7.1
Copyright 2020 Yusuf Wagh
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.