Skip to content

Commit

Permalink
Remove tempto-logging-log4j module
Browse files Browse the repository at this point in the history
This is module is not used anyway. Additionally it is difficult to
maintain because it is accessing test context during test initialization
(and so during test context initialization).
  • Loading branch information
kokosing committed Dec 23, 2019
1 parent c8fbac4 commit 24a5d7e
Show file tree
Hide file tree
Showing 8 changed files with 0 additions and 284 deletions.
30 changes: 0 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,36 +46,6 @@ For example, typical configuration is:

Tempto uses SLF4J for logging.

### Log file per test

If you are using log4j as your SLF4J backend we provide an appender which allows logging output of
each test and suite fulfillment process to separate files. To use that configure LOG4J appender as below:

```
log4j.rootLogger=INFO, TEST_FRAMEWORK_LOGGING_APPENDER
log4j.appender.TEST_FRAMEWORK_LOGGING_APPENDER=io.prestosql.tempto.logging.TestFrameworkLoggingAppender
log4j.category.io.prestosql.tempto=DEBUG
```

With this appender for each test suite run new logs directory is created within /tmp/tempto_logs. Name of directory
corresponds to time when Tempto is run (e.g. /tmp/tempto_logs/2015-04-22_15-23-09).
Log messages coming from different tests are logged to separate files.

Example contents of log directory:
```
io.prestosql.tests.hive.TestAllDatatypesFromHiveConnector.testSelectAllDatatypesOrc_2019-02-07_15-23-09
io.prestosql.tests.hive.TestAllDatatypesFromHiveConnector.testSelectAllDatatypesParquetFile_2019-02-07_15-23-09
io.prestosql.tests.hive.TestAllDatatypesFromHiveConnector.testSelectAllDatatypesRcfile_2019-02-07_15-23-09
io.prestosql.tests.hive.TestAllDatatypesFromHiveConnector.testSelectAllDatatypesTextFile_2019-02-07_15-23-09
io.prestosql.tests.hive.TestAllDatatypesFromHiveConnector.testSelectBinaryColumnTextFile_2019-02-07_15-23-09
io.prestosql.tests.hive.TestAllDatatypesFromHiveConnector.testSelectVarcharColumnForOrc_2019-02-07_15-23-09
SUITE_2015-04-22_15-23-09
```

If you want to override root location of logs you can use io.prestosql.tempto.root.logs.dir
```
java -Dio.prestosql.tempto.root.logs.dir=/my/root/logs/dir ...
```

### logging test id

Expand Down
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ ext.libraries = [
]

ext.tempto_core = project(':tempto-core')
ext.tempto_logging_log4j = project(':tempto-logging-log4j')
ext.tempto_examples = project(':tempto-examples')
ext.tempto_runner = project(':tempto-runner')
ext.tempto_ldap = project(':tempto-ldap')
Expand Down
1 change: 0 additions & 1 deletion tempto-core/src/test/resources/log4j.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#
# Set root logger to INFO and add a custom appender.
log4j.rootLogger=TRACE, TEST_FRAMEWORK_LOGGING_APPENDER, CONSOLE
log4j.appender.TEST_FRAMEWORK_LOGGING_APPENDER=io.prestosql.tempto.logging.TestFrameworkLoggingAppender

log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Target=System.out
Expand Down
1 change: 0 additions & 1 deletion tempto-examples/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ dependencies {
compile libraries.slf4j_api
compile libraries.junit

runtime tempto_logging_log4j
runtime libraries.slf4j_log4j
runtime libraries.postgresql_jdbc
runtime libraries.presto_jdbc
Expand Down
3 changes: 0 additions & 3 deletions tempto-examples/src/main/resources/log4j.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
# limitations under the License.
#
log4j.rootLogger=INFO, TEST_FRAMEWORK_LOGGING_APPENDER, CONSOLE
log4j.appender.TEST_FRAMEWORK_LOGGING_APPENDER=io.prestosql.tempto.logging.TestFrameworkLoggingAppender
log4j.appender.TEST_FRAMEWORK_LOGGING_APPENDER.layout=org.apache.log4j.PatternLayout
log4j.appender.TEST_FRAMEWORK_LOGGING_APPENDER.layout.conversionPattern=[%d{yyyy-MM-dd HH:mm:ss}] [%p] %c{10}: %m%n
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.Target=System.out
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
Expand Down
39 changes: 0 additions & 39 deletions tempto-logging-log4j/build.gradle

This file was deleted.

This file was deleted.

18 changes: 0 additions & 18 deletions tempto-logging-log4j/src/main/resources/log4j.properties-sample

This file was deleted.

0 comments on commit 24a5d7e

Please sign in to comment.