mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Kotlin: Log our verbosity level
This happens at `info` level, which is logged by default.
This commit is contained in:
@@ -140,6 +140,7 @@ class KotlinExtractorExtension(
|
|||||||
val logger = Logger(loggerBase, tw)
|
val logger = Logger(loggerBase, tw)
|
||||||
logger.info("Extraction started")
|
logger.info("Extraction started")
|
||||||
logger.flush()
|
logger.flush()
|
||||||
|
logger.infoVerbosity()
|
||||||
logger.info("Extraction for invocation TRAP file $invocationTrapFile")
|
logger.info("Extraction for invocation TRAP file $invocationTrapFile")
|
||||||
logger.flush()
|
logger.flush()
|
||||||
logger.info("Kotlin version ${KotlinCompilerVersion.getVersion()}")
|
logger.info("Kotlin version ${KotlinCompilerVersion.getVersion()}")
|
||||||
|
|||||||
@@ -244,6 +244,10 @@ open class LoggerBase(val logCounter: LogCounter) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun infoVerbosity(dtw: DiagnosticTrapWriter) {
|
||||||
|
info(dtw, "Kotlin extractor verbosity is " + verbosity.toString())
|
||||||
|
}
|
||||||
|
|
||||||
fun warn(dtw: DiagnosticTrapWriter, msg: String, extraInfo: String?) {
|
fun warn(dtw: DiagnosticTrapWriter, msg: String, extraInfo: String?) {
|
||||||
if (verbosity >= 2) {
|
if (verbosity >= 2) {
|
||||||
diagnostic(dtw, Severity.Warn, msg, extraInfo)
|
diagnostic(dtw, Severity.Warn, msg, extraInfo)
|
||||||
@@ -301,6 +305,10 @@ open class Logger(val loggerBase: LoggerBase, val dtw: DiagnosticTrapWriter) {
|
|||||||
loggerBase.info(dtw, msg)
|
loggerBase.info(dtw, msg)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fun infoVerbosity() {
|
||||||
|
loggerBase.infoVerbosity(dtw)
|
||||||
|
}
|
||||||
|
|
||||||
private fun warn(msg: String, extraInfo: String?) {
|
private fun warn(msg: String, extraInfo: String?) {
|
||||||
loggerBase.warn(dtw, msg, extraInfo)
|
loggerBase.warn(dtw, msg, extraInfo)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user