Switch log level from warn to info for empty table messages

Hi,

in order to reduce log noise and to improve debugging comfort I want to suggest to switch the log level of empty tables being returned from warn to info.

In most of the cases an empty table isn’t a problem but actually intended or the default result.

Time Stamp Message
2024-09-19 12:07:10,497 WARN Java Edit Variable 3:1141:0:1122:0:1120 The flow variable file.separator is not found in the input.
2024-09-19 12:07:10,516 WARN Java Edit Variable 3:1170:1141:0:1122:0:1120 The flow variable file.separator is not found in the input.
2024-09-19 12:07:10,563 WARN List Files/Folders 3:1141:0:1124 Node created an empty data table.
2024-09-19 12:07:10,563 WARN List Files/Folders 3:1170:1141:0:1124 Node created an empty data table.
2024-09-19 12:07:10,564 WARN Empty Table Switch 3:1141:0:1131 Node created an empty data table.
2024-09-19 12:07:10,564 WARN Empty Table Switch 3:1170:1141:0:1131 Node created an empty data table.
2024-09-19 12:07:10,564 WARN Column Filter 3:1141:0:1132 Node created an empty data table.
2024-09-19 12:07:10,565 WARN Column Filter 3:1170:1141:0:1132 Node created an empty data table.
2024-09-19 12:07:10,567 WARN NoOp (Table) 3:1141:0:1111 Node created an empty data table.
2024-09-19 12:07:10,568 WARN NoOp (Table) 3:1170:1141:0:1111 Node created an empty data table.
2024-09-19 12:07:10,568 WARN End IF 3:1141:0:1110 Node created an empty data table.
2024-09-19 12:07:10,568 WARN End IF 3:1170:1141:0:1110 Node created an empty data table.

Though, it might be worth to think about adding an option, which can be enable on demand in node config, to throw an actual warning i.e. if a row (reference) or rule based row filter gave an empty table back.

PS: As follows my log4f adjustment too filter out these messages:

File location (for me): E:\Knime-Workspace.metadata\knime\log4j3.xml

<!-- Filter "Node created an empty data table." -->
    <appender name="stdout" class="org.apache.log4j.ConsoleAppender">
        <layout class="org.apache.log4j.PatternLayout">
            <param name="ConversionPattern" value="%-5p\t %t %c{1}\t %.10000m\n" />
        </layout>
        <filter class="org.apache.log4j.varia.StringMatchFilter">
            <param name="StringToMatch" value="Node created an empty data table." />
            <param name="AcceptOnMatch" value="false" />
        </filter>
        <filter class="org.apache.log4j.varia.DenyAllFilter"/>
    </appender>

PS: The fallback seems to have improved but not fully filtered all out :thinking:

PPS: Nope, the filter didn’t filter anything :frowning:

Best
Mike

Are you trying to filter these messages from

  1. the Classic KNIME Console View,
  2. from the logfile, or
  3. from the node message/ModernUI Workflow Monitor?

Because you configure the appender name="stdout" it targets the output that you can see when you start the binary from a terminal (or from Eclipse SDK). It might be confusing, because the class is called ConsoleAppender.

The one you robably want to mess around with is appender name="knimeConsole", so 1. in the list above.
2. in the list above would be appender name="logfile".

The node message/Modern UI Workflow Monitor cannot be filtered.

2 Likes

I want to filter the Classic KNIME Console View.

Then you need to target appender name="knimeConsole" in the file. Does it work?