diff --git a/docs/source/developers/java/development.rst b/docs/source/developers/java/development.rst index ce7e1704f641c..f7b19d73da2e2 100644 --- a/docs/source/developers/java/development.rst +++ b/docs/source/developers/java/development.rst @@ -23,6 +23,20 @@ Development Guidelines .. contents:: +Logger Abstraction +================== + +Apache Arrow Java uses the SLF4J API, so please configure SLF4J to see logs (e.g. via Logback/Apache Log4j): + +1. If no jar dependencies are added by the user via Logback or Apache Log4j then SLF4J will default + to no-operation (NOP) logging. + +2. If a user adds any dependencies via Logback or Apache Log4j but does not configure/add/define + logback.xml/log4j2.xml, then logs will default to DEBUG mode. + +3. To disable debug logs, the user must define their own rules within their logback.xml/log4j2.xml + and define their own loggers. + Unit Testing ============ Unit tests are run by Maven during the build. diff --git a/java/adapter/avro/src/test/resources/logback.xml b/java/adapter/avro/src/test/resources/logback.xml new file mode 100644 index 0000000000000..4c54d18a210ff --- /dev/null +++ b/java/adapter/avro/src/test/resources/logback.xml @@ -0,0 +1,28 @@ + + + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/java/algorithm/src/test/resources/logback.xml b/java/algorithm/src/test/resources/logback.xml new file mode 100644 index 0000000000000..4c54d18a210ff --- /dev/null +++ b/java/algorithm/src/test/resources/logback.xml @@ -0,0 +1,28 @@ + + + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/java/compression/src/test/resources/logback.xml b/java/compression/src/test/resources/logback.xml new file mode 100644 index 0000000000000..4c54d18a210ff --- /dev/null +++ b/java/compression/src/test/resources/logback.xml @@ -0,0 +1,28 @@ + + + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/java/flight/flight-grpc/src/test/resources/logback.xml b/java/flight/flight-grpc/src/test/resources/logback.xml new file mode 100644 index 0000000000000..4c54d18a210ff --- /dev/null +++ b/java/flight/flight-grpc/src/test/resources/logback.xml @@ -0,0 +1,28 @@ + + + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/java/flight/flight-integration-tests/src/test/resources/logback.xml b/java/flight/flight-integration-tests/src/test/resources/logback.xml new file mode 100644 index 0000000000000..95fb0b37dc5d3 --- /dev/null +++ b/java/flight/flight-integration-tests/src/test/resources/logback.xml @@ -0,0 +1,28 @@ + + + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/java/flight/flight-sql/src/test/resources/logback.xml b/java/flight/flight-sql/src/test/resources/logback.xml new file mode 100644 index 0000000000000..4c54d18a210ff --- /dev/null +++ b/java/flight/flight-sql/src/test/resources/logback.xml @@ -0,0 +1,28 @@ + + + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/java/memory/memory-core/src/test/resources/logback.xml b/java/memory/memory-core/src/test/resources/logback.xml new file mode 100644 index 0000000000000..4c54d18a210ff --- /dev/null +++ b/java/memory/memory-core/src/test/resources/logback.xml @@ -0,0 +1,28 @@ + + + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + + diff --git a/java/memory/memory-unsafe/src/test/resources/logback.xml b/java/memory/memory-unsafe/src/test/resources/logback.xml new file mode 100644 index 0000000000000..4c54d18a210ff --- /dev/null +++ b/java/memory/memory-unsafe/src/test/resources/logback.xml @@ -0,0 +1,28 @@ + + + + + + + + + %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + + + + + + + + +