r.dispatch-core_2.8.0.0.8.10.source-code.logging.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dispatch-core_2.8.0 Show documentation
Show all versions of dispatch-core_2.8.0 Show documentation
Core interfaces, applied by dispatch-http and dispatch-nio executors
The newest version!
package dispatch.classic
/** Mix in to Http if you want JDK logging */
trait JdkLogging extends HttpExecutor {
override def make_logger = new dispatch.classic.Logger {
val jdklog = java.util.logging.Logger.getLogger("dispatch")
def info(msg: String, items: Any*) {
jdklog.info(msg.format(items: _*))
}
def warn(msg: String, items: Any*) {
jdklog.warning(msg.format(items: _*))
}
}
}
/**
* Mix in to Http if you want no logging from Dispatch.
* Note that HttpClient logs separately:
* http://hc.apache.org/httpcomponents-client/logging.html
*/
trait NoLogging extends HttpExecutor {
override def make_logger = new dispatch.classic.Logger {
def info(msg: String, items: Any*) { }
def warn(msg: String, items: Any*) { }
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy