You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Kyle Weaver (Jira)" <ji...@apache.org> on 2020/10/13 03:12:00 UTC

[jira] [Assigned] (BEAM-10953) Logging placeholder mismatches should be disallowed.

     [ https://issues.apache.org/jira/browse/BEAM-10953?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kyle Weaver reassigned BEAM-10953:
----------------------------------

    Assignee: Kyle Weaver

> Logging placeholder mismatches should be disallowed.
> ----------------------------------------------------
>
>                 Key: BEAM-10953
>                 URL: https://issues.apache.org/jira/browse/BEAM-10953
>             Project: Beam
>          Issue Type: Bug
>          Components: testing
>            Reporter: Kyle Weaver
>            Assignee: Kyle Weaver
>            Priority: P2
>          Time Spent: 5h 40m
>  Remaining Estimate: 0h
>
> slf4j Logger has overloaded methods for each severity level:
>     public void warn(String format, Object... arguments);
>     public void warn(String msg, Throwable t);
> These two signatures are often confused:
>     LOG.warn("foo {}", new Exception("bar"));
> This example does not print "foo bar" or anything like one would expect. Instead, "foo {}" (without any substitution). This often confuses Dataflow users.
> This pattern can be statically checked in Intellij. We should figure out how to enable similar checks using our existing static analysis tooling (perhaps errorprone?)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)