com.jayway.restassured.config
Class LogConfig

java.lang.Object
  extended by com.jayway.restassured.config.LogConfig

public class LogConfig
extends Object

Configure the logging for REST Assured.

Note that only log things known to REST Assured (i.e. the request- and response specifications) will be logged. If you need to log what's actually sent on the wire refer to the HTTP Client logging docs or use an external tool such as Wireshark.


Constructor Summary
LogConfig()
          Configure the default stream to use the System.out stream (default).
LogConfig(PrintStream defaultPrintStream)
          Configure the default stream where logs should be written if not specified explicitly by a filter.
 
Method Summary
 PrintStream defaultStream()
           
 LogConfig defaultStream(PrintStream printStream)
           
static LogConfig logConfig()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogConfig

public LogConfig()
Configure the default stream to use the System.out stream (default).


LogConfig

public LogConfig(PrintStream defaultPrintStream)
Configure the default stream where logs should be written if not specified explicitly by a filter. I.e. this stream will be used in cases where the log specification DSL is used, e.g.
 given().log().all()...
 
or
 expect().log.ifError(). ..
 
It will not override explicit streams defined by using the RequestLoggingFilter or the ResponseLoggingFilter.

Parameters:
defaultPrintStream - The default print stream to use for the LogSpecification's.
Method Detail

defaultStream

public PrintStream defaultStream()
Returns:
The default stream to use

defaultStream

public LogConfig defaultStream(PrintStream printStream)

logConfig

public static LogConfig logConfig()
Returns:
A static way to create a new LogConfig instance without calling "new" explicitly. Mainly for syntactic sugar.


Copyright © 2010-2011. All Rights Reserved.