Byte Buddy
timber
Byte Buddy | timber | |
---|---|---|
7 | 9 | |
6,239 | 10,428 | |
- | - | |
9.4 | 4.3 | |
3 days ago | 2 months ago | |
Java | Kotlin | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Byte Buddy
-
Ulyp: Recording Java code execution for faster debugging (Part 1)
Currently, Ulyp uses bytebuddy library which does an immense job of handling all the work of instrumentation and makes it extremely easy for all Java developers. The rest is relatively straightforward to implement. The ongoing blogposts will shed a light on how the tool is implemented. Right now, let’s move to action.
-
Which open-source projects are widely used but maintained by just a few people?
byte-buddy - runtime code generation for the Java virtual machine - https://github.com/raphw/byte-buddy
> It is stable and in use by distinguished frameworks and tools such as Mockito, Hibernate , Jackson, Google's Bazel build system and many others. Byte Buddy is also used by a large number of commercial products to great result. It is currently downloaded over 75 million times a year.
-
Monkey-patching in Java
As seen above, the API exposes the user to low-level bytecode manipulation via byte arrays. It would be unwieldy to do it directly. Hence, real-life projects rely on bytecode manipulation libraries. ASM has been the traditional library for this, but it seems that Byte Buddy has superseded it. Note that Byte Buddy uses ASM but provides a higher-level abstraction.
-
Any news on the Classfile API?
Just a drive-by comment: ByteBuddy is worth a look https://bytebuddy.net/. It is built on top of ASM.
-
Proposed: A new CMake scripting language usable alongside existing one
> can you show an example of how you'd parse, say, a .java.in
The canonical way to do such a thing is through the java annotation processing api [1] and using a tool like java poet [2]. Before you did that, you'd probably decide if you wanted to instead use bytecode generation with a library like bytebuddy [3]
But, assuming for some reason, you wanted to torture yourself and actually consume a java.in file and apply a regex, then you'd probably pull out the "maven-replacer-plugin" [4] and configure that for the task at hand. (or use your favorite templating language plugin. There's a million of them).
Though, to be fair, this really isn't something that comes up in regular java programming due to the nature of the ecosystem. Anything you'd want to codegen likely already has a library and anything you didn't would receive (legitimate) push back.
[1] https://www.baeldung.com/java-annotation-processing-builder
[2] https://github.com/square/javapoet
[3] https://bytebuddy.net/
[4] https://github.com/beiliubei/maven-replacer-plugin
-
is rust the only language to have procedural macros?
Have a look at byte buddy.
-
Byte Buddy on Android made possible
If you've ever used libraries like https://github.com/JakeWharton/hugo or https://hibernate.org/ (if you've ever done some backend development) and wondered how do they seem to add some code/logic into your app just by adding some annotation to some method, or if you ever wondered how mocking frameworks like Mockito can change a class behavior for example, then most likely you're interested in a programming technique that allows to modify existing code, usually known as Aspect oriented programming (also known in Java as Bytecode instrumentation) which, even though it might sound intimidating at first, some really cool tools such as Byte Buddy or AspectJ make it quite easy to accomplish.
timber
-
Building software for cattle farmers. Part 2. Production errors
To try and fix this problem fast I knew I needed some sort of logging and that is when I discovered Timber and Firebase Crashlynics. I then used THIS video to set both of them up and to create a decent crash reporting system.
-
Modern Android Development in 2023
Timber
-
Do yout stil use Android Timber lib?
Do you still use the Android Timber lib? The only real pro I see is that you don't need to declare the Tag, other than that that "pro" where each call checks if debug or not I wonder why you would like to have that, I mean what I want is all debug-only logs to get stripped out from the code, and instead of calling if(BuildConfig.Debug) on each Timer.xy() call why not create an extra Application class under the debug folder where logs are activated? Just trying to figure out of this lib that actually started like 9 years ago is still needed or not really anymore. https://github.com/JakeWharton/timber
- Advanced custom lint checks
-
Logging best practices?
One of the options could be to setup logging to the file within the app and sync it with backend once necessary or required. This could be achieved by using library, such as Timber and setting up local file. Depending on your constraints, such as file size, you might want to include a file rotation strategy, e.g. start a new file and remove the old one.
-
What are the most common used (3rd party) libraries and frameworks used in Android development?
Timber for logging
-
This video is about Square Logcat open source Library and how it works more efficient than Timber. No hard feelings toward Jake Wharton!
Same as in Timber
- Timber 5.0 is out! Rewritten in Kotlin, binary compatible with 4.x and support for AGP 7.0 lint checks (/r/androiddev)
- Timber 5.0 is out! Rewritten in Kotlin, binary compatible with 4.x and support for AGP 7.0 lint checks
What are some alternatives?
Javassist - Java bytecode engineering toolkit
puree-android - A log collector for Android
Byteman - Byteman Project main repo
ASimpleCache - a simple cache for android and java
joda-time-android - Joda-Time library with Android specialization
routable-android - Routable, an in-app native URL router, for Android
easydeviceinfo - :iphone: [Android Library] Get device information in a super easy way.
RoboGif - A small utility to record Android device screen to a GIF
AndroidProcesses - DEPRECATED
StatusBarUtil - A util for setting status bar style on Android App.
Android-Templates-And-Utilities - Collection of source codes, utilities, templates and snippets for Android development.