DEV Community

boroskoyo
boroskoyo

Posted on • Edited on • Originally published at Medium

How to add logs to your running applications on-demand without redeploying, restarting, or stopping the execution

Logs have become a fundamental part of traditional software development as they help us understand what is going on with our systems while they are running.

Photo by Thierry Chabot on Unsplash

Regardless of your runtime you can add logs anywhere you want and start collecting information but there is always a catch:

As your system becomes more complex and/or the number of logs you are generating increases it is getting easier to get lost in log piles. On the flip side, logs only help you if they are placed in the right place and any replacement etc. requires a new deployment which does not end to be the most chill scenario if you are trying to find a bug in production.

These two points create a dilemma:

You either log everything for your comfort and get lost in gigabytes or maybe a larger of logs you have created or you end up with inadequate logs that you need to populate by adding more logs into your code and redeploying it.

Solution: Dynamic logging

Our latest update brings logpoints along with many improvements.

Logpoints are points that you can add to your running application, just like Tracepoints, for adding logs dynamically.

Logpoints solve the dilemma by letting you add logs to your running applications without stopping and redeploying. Since you can add and remove your logs at any time, getting the log wherever and whenever you need it becomes a walk at the park!

Not only solving the issues of traditional logging, but Sidekick Logpoint feature also comes with extras. In addition to adding and removing logs on demand, with Sidekick you can:

  • Define conditions for your logpoints

  • Define time to live and maximum hit counts

  • Change log levels dynamically

  • Enrich your log content with variable information from the context

  • Configure agent to print logs directly to stdout

  • Send generated logs to any target you desire!

Our integrations with Slack and some of the well-known logging tools are at the corner and we also added custom webhook support for you to extend the possibilities. Don’t forget to join our Discord channel for news and to share your integration requests.

TL;DR

Sidekick’s Logpoints feature, in the end, opens the way of dynamic logging to its users. It replaces traditional logging with dynamic logging. This means you easily have the potential to lower stage sizes, costs, and time for log searching. Additionally, logpoints feature brings the ability to add new logpoints without editing the source code, redeploying, or restarting the application.

Top comments (0)