[
https://issues.apache.org/jira/browse/IGNITE-14897?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yury Gerzhedovich resolved IGNITE-14897.
----------------------------------------
Resolution: Not A Problem
> Separate loggers for different Ignite nodes.
> --------------------------------------------
>
> Key: IGNITE-14897
> URL: https://issues.apache.org/jira/browse/IGNITE-14897
> Project: Ignite
> Issue Type: New Feature
> Reporter: Andrey Mashenkov
> Priority: Major
> Labels: ignite-3, tech-debt
>
> h3. Motivation
> For now we use statically initialized loggers in classes. This can leads to
> mess in logs when user starts 2+ nodes in the same JVM and therefore, to
> harder or even impossible debugging.
> Ignite-2 is not affected with this, because every node has a separate logger
> instance and can write logs into a separate file.
> h3. Description
> To resolve this we should use separate logger for each node instance.
> Possible solutions
> # Avoid static logger usage.
> # Use static wrappers for Thread-local loggers.
> With the first approach, we have to pass loggers to every component via
> constructor or use dependency injection or create logger manually. Also, we
> should bother about passing correct logger category to the object that may
> use it and logger instance creation rate (if it is created in for every class
> instance)
> With the second one, we can use a default single logger instance for user
> threads
> and use thread-local like wrappers for Ignite node threads.
> Instead of using a ThreadLocal class directly and avoid hash-table lookups,
> we can introduce IgniteThread class with a Logger field.
> The logger may either add a node prefix to all messages or delegate calls to
> other logger of certain category (if we want to or will be able to support
> different logger configurations for different nodes).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)