mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-09 15:05:50 +01:00
Use logger instead of println
This commit is contained in:
@@ -46,16 +46,17 @@ object SshServer {
|
|||||||
*/
|
*/
|
||||||
class SshServerListener extends ServletContextListener with SystemSettingsService {
|
class SshServerListener extends ServletContextListener with SystemSettingsService {
|
||||||
|
|
||||||
|
private val logger = LoggerFactory.getLogger(classOf[SshServerListener])
|
||||||
|
|
||||||
override def contextInitialized(sce: ServletContextEvent): Unit = {
|
override def contextInitialized(sce: ServletContextEvent): Unit = {
|
||||||
val settings = loadSystemSettings()
|
val settings = loadSystemSettings()
|
||||||
if(settings.ssh){
|
if(settings.ssh){
|
||||||
if(settings.baseUrl.isEmpty){
|
settings.baseUrl match {
|
||||||
// TODO use logger?
|
case None =>
|
||||||
println("Could not start SshServer because the baseUrl is not configured.")
|
logger.error("Could not start SshServer because the baseUrl is not configured.")
|
||||||
} else {
|
case Some(baseUrl) =>
|
||||||
SshServer.start(sce.getServletContext,
|
SshServer.start(sce.getServletContext,
|
||||||
settings.sshPort.getOrElse(SystemSettingsService.DefaultSshPort),
|
settings.sshPort.getOrElse(SystemSettingsService.DefaultSshPort), baseUrl)
|
||||||
settings.baseUrl.get)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user