Very simple, practical, attractive and powerful logger for android
- Each arguamnt
- Fast writer
- Show log's address
- Show array content
- Draw a chart
- Draw a table
- Open json format
- View detection
- Customize time
- Safe null
- Split launch
- Show elapsing
- Adapted with crashes
- Set title for logs
implementation 'com.github.vahider:logz:1.6.1'
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
Tip:
Title
is optional with a different style for each log. To add title to log, add an object before themsg
. Example:Logz.i(title, everything);
Logz.v(eveything);
Logz.d(eveything);
Logz.i(eveything);
Logz.w(eveything);
Logz.e(eveything);
Logz.is(eveything);
Logz.line(eveythings);
Logz.line();
Logz.json(List);
Logz.chart(double array);
Logz.table(list, Name of methods as reflection);
new Logz.Builder()
.setTag("⌬ LOGZ")
.setEnable(true)
.setUsed(true)
.showInfo(true)
.setInfoClickable(false)
.setTimeFormat(Time.CLOCK)
.setInfoMode(Info.CLASS, Info.METHOD, Info.LINE)
.useSummaryMode(Summary.START)
.setTitleCase(Case.CAMEL_SPACE)
.showElapsing(true)
.useViewDetection(true)
.setLimitLength(false)
.reload();
Method | Default | Arguments | Description | Usage |
---|---|---|---|---|
setTag | "⌬ LOGZ" | Anything | rename log tag | To follow the logs in Logcat, read more in the settings |
setEnable | true | true false |
To turn off the logz | You can disable it when you publish |
setUsed | true | true false |
To disable the Logz engine and use the default log | When browsing a few thousand logs, to increase speed |
showInfo | true | true false |
Show log time and address | Set true when you want to see the log information |
setInfoClickable | true | true false |
With click on the log information in the logcat and be directed to the location of the log | Everytime |
setTimeFormat | Time.CLOCK | NONE STAMP CLOCK DATE FULL "yyyy/MM/dd-HH:mm:ss" |
How do you want to see the information time? | Everytime |
setInfoMode | Info.CLASS, Info.METHOD, Info.LINE | FILE CLASS METHOD LINE |
Which log information to display? | Everytime |
useSummaryMode | Summary.START | START END NONE |
Summary of information | When the log information is longer than 20 characters |
setTitleCase | Case.CAMEL_SPACE | CAMEL CAMEL_SPACE NONE |
Types of log titles | Everytime |
showElapsing | true | true false |
Display the delay between two logs if more than 3 seconds have elapsed | Everytime |
useViewDetection | true | true false |
Summary of view | Everytime |
setLimitLength | false | true false |
Limitation for Maximum Line | When you have a table or jason that has countless lines |
To have a better experience than Logz, make the above settings and feel the change
To delete old information as well as shorten it, you have to click on the settings icon in the left menu of logcat and delete all the ticks.
For only writed logs to be displayed, you must create a new filter
in the logcat.
So in the logcat, click on the filters menu and click on Edit Filter Configuration
and choose a name for your filter, and finally write the ⌬
in the Log Message
field or tagname in the Log Tag
field.
If you want to see other logs, just select other filters, such as show only selected applicatinos
or no filters
To better identify the logs, you can change the color of the logs in Android Studio. Go to File>Settings>Editor>ColorScheme>AndroidLogcat then change color the color of each levels.
To align the templates, try using a font that has the same letters.
go to File>Settings>Editor>ColorScheme>ConsoleFont and select a font that is the same width, example Consolas
Press Alt + 6 to open or close the logcat
MIT License
Copyright (c) 2020 Vahid
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.