public class VerifiableLog4jAppender
extends java.lang.Object
Constructor and Description |
---|
VerifiableLog4jAppender(java.util.Properties props,
int maxMessages) |
Modifier and Type | Method and Description |
---|---|
static VerifiableLog4jAppender |
createFromArgs(java.lang.String[] args)
Construct a VerifiableLog4jAppender object from command-line arguments.
|
static java.util.Properties |
loadProps(java.lang.String filename)
Read a properties file from the given path
|
static void |
main(java.lang.String[] args) |
public VerifiableLog4jAppender(java.util.Properties props, int maxMessages)
public static java.util.Properties loadProps(java.lang.String filename) throws java.io.IOException, java.io.FileNotFoundException
filename
- The path of the file to read
Note: this duplication of org.apache.kafka.common.utils.Utils.loadProps is unfortunate
but *intentional*. In order to use VerifiableProducer in compatibility and upgrade tests,
we use VerifiableProducer from trunk tools package, and run it against 0.8.X.X kafka jars.
Since this method is not in Utils in the 0.8.X.X jars, we have to cheat a bit and duplicate.java.io.IOException
java.io.FileNotFoundException
public static VerifiableLog4jAppender createFromArgs(java.lang.String[] args)
public static void main(java.lang.String[] args) throws java.io.IOException
java.io.IOException