This commit is contained in:
2026-03-27 17:45:51 +09:00
parent 9803b27741
commit 681472df58
6 changed files with 169 additions and 95 deletions
+18 -3
View File
@@ -77,8 +77,23 @@ fun getLlamaBinPath(): String {
else -> "$basePath/llama-server"
}
}
fun main() = application {
fun initLogger(isDebug: Boolean) {
val root = org.slf4j.LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME) as ch.qos.logback.classic.Logger
if (isDebug) {
root.level = ch.qos.logback.classic.Level.DEBUG
println("🛠️ 디버그 모드: 상세 로그를 출력합니다.")
} else {
root.level = ch.qos.logback.classic.Level.ERROR
// 특정 라이브러리(Exposed)만 콕 집어서 끄기
(org.slf4j.LoggerFactory.getLogger("Exposed") as ch.qos.logback.classic.Logger).level = ch.qos.logback.classic.Level.OFF
println("🤫 운영 모드: 에러 로그만 출력합니다.")
}
}
fun main() = application {
initLogger(AutoTradingManager.DETAILLOG)
val trayState = rememberTrayState()
var isWindowOpen by remember { mutableStateOf(false) } // 창의 표시 상태 관리
@@ -193,10 +208,10 @@ fun main() = application {
}
if (config.modelPath.isNotEmpty()) {
LlamaServerManager.startServer(binPath, config.modelPath,port = 8080)
LlamaServerManager.startServer(binPath, config.modelPath,port = AutoTradingManager.LLM_PORT)
}
if (config.embedModelPath.isNotEmpty()) {
LlamaServerManager.startServer(binPath, config.embedModelPath, port = 8081)
LlamaServerManager.startServer(binPath, config.embedModelPath, port = AutoTradingManager.EMBEDDING_PORT)
}
// 대시보드로 화면 전환