orhanobut/logger vs xLog
iadcialim opened this issue · 12 comments
Question. Sorry, but how is this different from https://github.com/orhanobut/logger?
@iadcialim xLog
is more like a logger framework and contains some built-in implementations, all components are customizable.
logger
is simple and lightweight, but not so easy to customize.
You can go through the doc in README.md, you will know the differences.
It's recommended to use xLog
instead of logger
when developing a new project.
@iadcialim Also you can take a look at the issue I created in logger
orhanobut/logger#255
Thank you @elvishew for the answer. After checking README and that ticket in orhanobut/logger#255, it's pretty clear that xLog
is very extensive and highly customizable especially the main customizations and strategies for managing logs in a file. I am going to use this one moving forward instead of logger
=)
I really like the pretty logs in my logcat window and the ease of clicking on the class-line number link to jump to the line where its prints the logs - this is very convenient to us developers.
Now I am thinking of saving the logs in a file and later retrieve them from the device.
But I am just thinking if it's possible to load the contents of a log file into the logcat window.
So that I can enjoy the convenience in the first sentence above.
I really like the pretty logs in my logcat window and the ease of clicking on the class-line number link to jump to the line where its prints the logs - this is very convenient to us developers.
Now I am thinking of saving the logs in a file and later retrieve them from the device.
But I am just thinking if it's possible to load the contents of a log file into the logcat window.
So that I can enjoy the convenience in the first sentence above.
It's possible, but you need to load by yourself(just like loading a normal file) and print the contents to logcat via AndroidPrinter
Do you mean by parsing the contents of the log file and logging them again?
Do you mean by parsing the contents of the log file and logging them again?
Yes, but don't log them to file again, just log to logcat by specifyingAndroidPrinter
(how to? you can refer to README)
Do I need to run an android app for this to log again the contents of the log file? Or is there a way to easily feed the logfile into logcat?
Do I need to run an android app for this to log again the contents of the log file? Or is there a way to easily feed the logfile into logcat?
No, there is no such tool to "replay" the log file to the terminal.
If you just want to "view" the content of the log file, why not just cat
them to the terminal?
So that I can click on the link in the logs and it will jump on the file and line number in Android Studio =)
So that I can click on the link in the logs and it will jump on the file and line number in Android Studio =)
If you cat
them in Android Studio's terminal tab, YES.
The click-and-jump is a feature of Android Studio.
Just try it.
Ya, it worked. Awesome man!