Skip to content

Double error logging with root handler set on error level #702

@aiguo-ebay

Description

@aiguo-ebay

In order to get rid of noisy logs from 3rd party libs, we set root handler to the error level then set it to info level for the application package
We upgrades to latest version [3.16.1], still had the same issue.

  override def load(): Unit = {
    OutputFormat.default = ASCIIOutputFormat
    Formatter.default = formatterWithoutThread
    // Set the root handler to the error level
    Logger.root.clearHandlers().withHandler(minimumLevel = Some(Level.Error)).replace()

    // Set the com.xxx packages to the info level
    Logger("com.xxx").withHandler(minimumLevel = Some(Level.Info)).replace()
}

example:

2025.04.08 15:00:54:298 ERROR c.e.f.i.b.g.AlphaIndexBuilderAbstract.buildAlphaIndex:175 - Error while processing rowKey [13340046280626274300], pkId [170032530777]
2025.04.08 15:00:54:298 ERROR c.e.f.i.b.g.AlphaIndexBuilderAbstract.buildAlphaIndex:175 - Error while processing rowKey [13340046280626274300], pkId [170032530777]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions