Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sbabcoc/logback-testng
Logback appender for TestNG Reporter
https://github.com/sbabcoc/logback-testng
logback-appender testng testng-reporter
Last synced: 25 days ago
JSON representation
Logback appender for TestNG Reporter
- Host: GitHub
- URL: https://github.com/sbabcoc/logback-testng
- Owner: sbabcoc
- License: apache-2.0
- Created: 2017-01-12T17:13:44.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-05-09T19:01:11.000Z (over 1 year ago)
- Last Synced: 2023-08-25T02:38:12.178Z (about 1 year ago)
- Topics: logback-appender, testng, testng-reporter
- Language: Java
- Size: 71.3 KB
- Stars: 10
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Maven Central](https://img.shields.io/maven-central/v/com.github.sbabcoc/logback-testng.svg)](https://mvnrepository.com/artifact/com.github.sbabcoc/logback-testng)
# logback-testng
Logback appender for TestNG ReporterThis appender enables users to direct the Logback output from TestNG tests to the TestNG Reporter. This output will be captured in the test result artifacts of each test method. This appender extends the standard [OutputStreamAppender](http://logback.qos.ch/manual/appenders.html#OutputStreamAppender), providing the full range of encoding options.
**NOTE**: Although the `ReporterAppender` class extends [OutputStreamAppender](http://logback.qos.ch/apidocs/ch/qos/logback/core/OutputStreamAppender.html), selection of a target output stream is not supported. Output from this appender is always directed to a `ReporterOutputStream`, which emits its contents to the TestNG [Reporter](http://testng.org/javadocs/org/testng/Reporter.html).
## Full configuration example
Add `logback-testng` and `logback-classic` as library dependencies to your project.
```xml
[maven pom.xml]com.github.sbabcoc
logback-testng
1.0.0
runtimech.qos.logback
logback-classic
1.1.2
runtime```
This is an example `logback.xml` that uses a common `PatternLayout` to encode a log message as a string.
```xml
[src/main/resources/logback.xml]
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
```
You may also look at the [complete configuration examples](src/test/resources/logback.xml)
## License
This project is licensed under the [Apache License Version 2.0](LICENSE).