Commit 245d5214 authored by Him188's avatar Him188

Add default `dir` and `file` for `redirectBotLogToDirectory` and `redirectBotLogToFile`

parent c4541c8f
......@@ -100,7 +100,7 @@ actual open class BotConfiguration : BotConfigurationBase() { // open for Java
@ConfigurationDsl
@SinceMirai("1.1.0")
fun redirectBotLogToDirectory(
dir: File,
dir: File = File("logs"),
retain: Long = 1.weeksToMillis,
identity: (bot: Bot) -> String = { "Net ${it.id}" }
) {
......@@ -119,7 +119,7 @@ actual open class BotConfiguration : BotConfigurationBase() { // open for Java
@ConfigurationDsl
@SinceMirai("1.1.0")
fun redirectBotLogToFile(
file: File,
file: File = File("mirai.log"),
identity: (bot: Bot) -> String = { "Net ${it.id}" }
) {
require(!file.isDirectory) { "file must not be a dir" }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment