logger

actual var logger: LogFunction?(source)

The logger that the parser will use during parsing.

Example

import android.util.Log;

parser.logger = { type, msg ->
Log.d("TS ${type.name}", msg)
}
expect var logger: LogFunction?(source)

The logger that the parser will use during parsing.

actual var logger: LogFunction?(source)

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)
}
actual var logger: LogFunction?(source)

The logger that the parser will use during parsing.