apache / apache/parquet-java

Deprecate Log and move to SLF4J Logger

Open
#1,460 8 comments 0 reactions 0 assignees View on GitHub
Component: Java Component: Parquet Priority: Major Type: bug
Dominant language
Java
Stars
3.1k
Forks
1.6k
Avg merge
3d 12h
Merged PRs (30d)
33

Description

The current Log class is intended to allow swapping out logger back-ends, but SLF4J already does this. It also doesn't expose as nice of an API as SLF4J, which can handle formatting to avoid the cost of building log messages that won't be used. I think we should deprecate the org.apache.parquet.Log class and move to using SLF4J directly, instead of wrapping SLF4J (PARQUET-305).

This will require deprecating the current Log class and replacing the current uses of it with SLF4J.

**Reporter**: [Ryan Blue](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=rdblue) / @rdblue
#### Related issues:
- [Fix flush() for RecordConsumer and implementations](https://github.com/apache/parquet-java/issues/1941) (is blocked by)
- [Avoid evoking job.toString() in ParquetLoader](https://github.com/apache/parquet-java/issues/1942) (is blocked by)
- [Shading SLF4J prevents SLF4J locating org.slf4j.impl.StaticLoggerBinder](https://github.com/apache/parquet-format/issues/302) (is related to)
- [Logger instantiated for package org.apache.parquet may be GC-ed](https://github.com/apache/parquet-java/issues/1830) (is related to)
- [Shutdown hook in parquet-avro library corrupts data and disables logging](https://github.com/apache/parquet-java/issues/1916) (is required by)

**Note**: *This issue was originally created as [PARQUET-401](https://issues.apache.org/jira/browse/PARQUET-401). Please see the [migration documentation](https://issues.apache.org/jira/browse/PARQUET-2502) for further details.*

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the org.apache.parquet.Log class and find its current uses across the project. Read the linked migration documentation before changing the logging approach. Done means the Log class is deprecated and current uses have been replaced with SLF4J directly.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.