Dynamic message variant in adaptive logging method
І. О. Супруненко, Volodymyr Rudnytskyi · Modern information security · 2024
Observability is an essential part of software systems.As the scale and outreach of modern technologies grow, it becomes increasingly important to be able to pinpoint and diagnose software issues in a timely manner.One approach that is commonly used by developers involves utilizing a technique called "logging", most likely in a form that is based on the idea of outputting log messages coupled with level of severity.This combination helps to group and categorize different reporting messages for processing afterwards.But sometimes this is not enough as some applications might be so complex and sophisticated that severity-only categorization does not scale properly.To solve this issue an adaptive logging method was introduced.It adds the concept of "log tags" and a special configuration that allows to include or exclude specific tags or their combinations.This article takes the idea of adaptive logging a step further and introduces a new plane of adaptability with dynamic message variants: a specific type of log messages with the ability to override reporting information "on the fly" without changing the source code.At first the motivation and necessity for such functionality is described in abstract terms, then a formalized model of proposed change is presented.A detailed explanation and reasoning behind certain data structures that make dynamic messages possible is presented, providing a reasonable amount of architectural considerations to make implementation in different environments and programming languages more achievable.At the end special attention is paid to some important aspects and requirements that should be carefully considered by implementers when writing their own version of adaptive logging method.The results of applying the proposed update to adaptive logging method would allow developers to have even more tools to extract information about system's execution and incorrect behaviors easier and with greater detail.