getBanner

fun getBanner(filename: String, classLoader: ClassLoader = defaultResourceClassLoader()): String

Loads an ASCII art banner from a classpath resource file, trims leading/trailing blank lines, and indents each line for display.

Banner text can be generated at: http://patorjk.com/software/taag/

Return

the formatted banner string with surrounding newlines

Parameters

filename

the classpath resource file containing the banner text

classLoader

the classloader used to find filename; defaults to the thread context classloader

Throws

if the banner resource file is not found


fun getBanner(filename: String, logger: KLogger): String

Loads a banner like getBanner, finding filename through the thread context classloader and falling back to logger's classloader.

Return

the formatted banner string with surrounding newlines

Parameters

filename

the classpath resource file containing the banner text

logger

a KLogger whose classloader is searched if the context classloader cannot find filename

Throws

if the banner resource file is not found