Logging remains a crucial aspect of any Java application, especially when it comes to high-volume, mission-critical systems. However, striking a balance between comprehensive logging and cost has long been a challenge for developers. With Prefab's dynamic logging, we're changing the game.
Prefab let's you:
When you're working with Java, high-performance, business-critical applications are the name of the game. Java libraries are renowned for their ability to generate vast amounts of detailed logs, which, while invaluable for debugging, can come at a steep cost in terms of log aggregation and system performance.
Don't choose! Have it both ways. Instant changes means debug logs just when they're useful.
Log pipelines cost money. Log ingestion costs money. Log retention costs money. Log querying costs money. Take control at the root of the problem with Prefab.
Prefab acts as a simple dynamic filter that fits in your existing log infrastructure. Logging is evaluated against your rules, which update instantly.
Output just the logs that you need and save money on all elements of logging.
configClient.getContextStore()
.addContext(PrefabContext.newBuilder("user")
.put("id", user.id())
.put("country", user.country())
.put("email", user.email()).build()
);
If you've already implemented Java MDC (Mapped Diagnostic Context) in your application, you're one step ahead of the curve. By storing key contextual information (e.g., user IDs or order IDs) within MDC, targeted logging becomes a breeze.
Integrating Prefab with your MDC setup allows you to concentrate logging on specific users or transactions, providing the perfect balance of detail and efficiency.
Prefab's dynamic logging solution ushers in a new era of log management for Java developers. By taking your existing logging code and infrastructure and capitalizing on MDC's inherent strengths, you can fine-tune logging efforts and fully exploit Java's robust logging features.
To learn more, check out the Micronaut or Dropwizard sample applications and sign up for a free account.
Prefab exists to save you money and speed your debugging. Any questions at all, please just contact us in chat. Happy debugging! 🚀
Here is a full tutorial video of adding Prefab to a Java application. This example is in Micronaut. We also have an example application in Dropwizard, but this all works in any Java application using Logback. Log4j support is in beta, just contact us for details.