-
Notifications
You must be signed in to change notification settings - Fork 136
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2. Add debug logging when handling cq operation 3. Typo in README.md
- Loading branch information
1 parent
216f1d5
commit a8f11b2
Showing
10 changed files
with
180 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package tech.mihoyo.mirai.util | ||
|
||
import net.mamoe.mirai.utils.MiraiLoggerPlatformBase | ||
import tech.mihoyo.mirai.PluginBase | ||
|
||
class Logger(override val identity: String?) : MiraiLoggerPlatformBase() { | ||
private val consoleLogger = PluginBase.logger | ||
override fun verbose0(message: String?) { | ||
consoleLogger.verbose(message) | ||
} | ||
|
||
override fun verbose0(message: String?, e: Throwable?) { | ||
consoleLogger.verbose(message, e) | ||
} | ||
|
||
override fun debug0(message: String?) { | ||
if (PluginBase.debug) consoleLogger.debug(message) | ||
} | ||
|
||
override fun debug0(message: String?, e: Throwable?) { | ||
if (PluginBase.debug) consoleLogger.debug(message, e) | ||
} | ||
|
||
override fun info0(message: String?) { | ||
consoleLogger.info(message) | ||
} | ||
|
||
override fun info0(message: String?, e: Throwable?) { | ||
consoleLogger.info(message, e) | ||
} | ||
|
||
override fun warning0(message: String?) { | ||
consoleLogger.warning(message) | ||
} | ||
|
||
override fun warning0(message: String?, e: Throwable?) { | ||
consoleLogger.warning(message, e) | ||
} | ||
|
||
override fun error0(message: String?) { | ||
consoleLogger.error(message) | ||
} | ||
|
||
override fun error0(message: String?, e: Throwable?) { | ||
consoleLogger.error(message, e) | ||
} | ||
} | ||
|
||
val logger = Logger("CQHTTPAPI") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.