com.github.yoojia.web.LoggerModule.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of next-web-logging Show documentation
Show all versions of next-web-logging Show documentation
NextWebKotlin: A Servlet 3+ based micro web framework written in Kotlin
package com.github.yoojia.web
import com.github.yoojia.web.core.Module
import java.text.SimpleDateFormat
/**
* @author Yoojia Chen ([email protected])
* @since 1.0
*/
abstract class LoggerModule : Module{
companion object {
internal val LOGGING_TEXT_NAME = ""
internal val LOGGING_ENABLED_NAME = ""
internal val FORMATTER = SimpleDateFormat("yyyy-MM-dd HH:mm:ss:SSS")
internal fun addLine(name: String, value: Any, buff: StringBuilder) {
buff.append(name).append(": ").append(value).append("\r\n")
}
internal fun addSubLine(name: String, value: Any, buff: StringBuilder) {
buff.append(" ").append(name).append(": ").append(value).append("\r\n")
}
}
}