[
https://issues.apache.org/jira/browse/IGNITE-7284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16328600#comment-16328600
]
Stanislav Lukyanov commented on IGNITE-7284:
--------------------------------------------
[~vkulichenko],
{quote}Let's rename warnDev to warnDevOnly.
{quote}
Done.
{quote}System property name should not 'WARNINGS' word in it, as it can be
related to other log levels as well. IGNITE_DEV_ONLY_LOGGING_DISABLED looks
better to me.
{quote}
Done.
{quote}IgniteUtils should initialize system property value in the static block
and then the value should be reused. It's a bad idea to call System.getProperty
every time, check how this is done for other properties.
{quote}
I don't think that's necessary. Even IgniteUtils doesn't do that for a lot of
properties - it mostly caches readonly properties like os.name and the
properties that shouldn't change dynamically, like IGNITE_MBEANS_DISABLED. With
IGNITE_DEV_ONLY_LOGGING_DISABLED it is quite easy to handle the dynamic change
of the value (and it even makes sense, particularly in testing and maybe
debugging) so I'd keep it as it is. Also, the cost of property lookup should be
small enough to ignore it compared to the writing the message to the log.
{quote}Marker seems to be nullable. If so, parameter should be marked with
@Nullable in IgniteLogger interface.
{quote}
Done
{quote}In addition, I think these two log statements can be marked with
DEV_ONLY right away (we obviously will add more as we go):
* Config validation warnings in GridCacheStoreManagerAdapter#start0.
* Performance suggestions printed out by GridPerformanceSuggestions.{quote}
Actually, I think both of these are not "development only" - they're rather
about deployment and can be fixed without rewriting the code.
If you want to handle all these messages together, maybe we should name the
marker like USAGE_SUGGESTION instead of DEV_ONLY. That would be a marker for
the messages that help to write code and configs, but not to debug dynamic
problems like network failures. Also we might want to deprecate
IGNITE_PERFORMANCE_SUGGESTIONS_DISABLED since USAGE_SUGGESTION marker and the
related property would be used instead.
> Introduce DEV_ONLY marker to IgniteLogger
> -----------------------------------------
>
> Key: IGNITE-7284
> URL: https://issues.apache.org/jira/browse/IGNITE-7284
> Project: Ignite
> Issue Type: Improvement
> Components: general
> Affects Versions: 2.3
> Reporter: Valentin Kulichenko
> Assignee: Stanislav Lukyanov
> Priority: Major
> Fix For: 2.4
>
>
> Need to add markers support to {{IgniteLogger}} and then introduce
> {{DEV_ONLY}} marker for warnings that can be suppressed in prod environments.
> Problem and solution are discussed in more detail here:
> http://apache-ignite-developers.2346864.n4.nabble.com/Suppressing-quot-development-quot-warning-td25195.html
> Make sure to update Loggers documentation explaining how the parameter works
> and what's it for:
> https://apacheignite.readme.io/docs/logging
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)