redirectLoggingToFile

fun redirectLoggingToFile(filename: String, dir: String): () -> Unit

Redirects all logging to a file and returns a function to restore the original logging configuration. This is useful during interactive chat sessions to prevent log output from interfering with the UI.