logger
The logger that the parser will use during parsing.
Example
import android.util.Log;
parser.logger = { type, msg ->
Log.d("TS ${type.name}", msg)
}
Content copied to clipboard
The logger that the parser will use during parsing.
The logger that the parser will use during parsing.
Example
import org.slf4j.LoggerFactory;
import org.slf4j.MarkerFactory;
val logger = LoggerFactory.getLogger(parser.javaClass)
val lexMarker = MarkerFactory.getMarker("TS LEX")
val parseMarker = MarkerFactory.getMarker("TS PARSE")
parser.logger = { type, msg ->
val marker = when (type) {
LogType.LEX -> lexMarker
LogType.PARSE -> parseMarker
}
logger.debug(marker, msg)
}
Content copied to clipboard
The logger that the parser will use during parsing.