Class LifecycleLogger
java.lang.Object
com.github.toolarium.jwebserver.logger.LifecycleLogger
The startup logger
-
Constructor Summary
ConstructorsConstructorDescriptionConstructorLifecycleLogger(picocli.CommandLine.Help.ColorScheme colorSchema) Constructor -
Method Summary
Modifier and TypeMethodDescriptionpicocli.CommandLine.Help.ColorSchemeGet the color schemaConvert aThrowableto aString, with message and stack traces extracted and colored according toColorScheme.prepareResourcePath(IWebServerConfiguration webServerConfiguration) Prepare the resource pathprepareServerStartup(IWebServerConfiguration webServerConfiguration, List<io.undertow.Undertow.ListenerInfo> listenerInfoList) Get server messagevoidprintServerStartup(IWebServerConfiguration webServerConfiguration, List<io.undertow.Undertow.ListenerInfo> listenerInfoList) Print server startup
-
Constructor Details
-
LifecycleLogger
public LifecycleLogger()Constructor -
LifecycleLogger
public LifecycleLogger(picocli.CommandLine.Help.ColorScheme colorSchema) Constructor- Parameters:
colorSchema- the color schema
-
-
Method Details
-
getColorScheme
public picocli.CommandLine.Help.ColorScheme getColorScheme()Get the color schema- Returns:
- Get the color schema
-
printServerStartup
public void printServerStartup(IWebServerConfiguration webServerConfiguration, List<io.undertow.Undertow.ListenerInfo> listenerInfoList) Print server startup- Parameters:
webServerConfiguration- the web server configurationlistenerInfoList- the listener information
-
preapreThrowable
Convert aThrowableto aString, with message and stack traces extracted and colored according toColorScheme.- Parameters:
t- theThrowableto be converted- Returns:
- converted and colored
String
-
prepareServerStartup
public String prepareServerStartup(IWebServerConfiguration webServerConfiguration, List<io.undertow.Undertow.ListenerInfo> listenerInfoList) Get server message- Parameters:
webServerConfiguration- the web server configurationlistenerInfoList- the listener information- Returns:
- the server message
-
prepareResourcePath
Prepare the resource path- Parameters:
webServerConfiguration- the web server configuration- Returns:
- the prepared resource path
-