Class LifecycleLogger

java.lang.Object
com.github.toolarium.jwebserver.logger.LifecycleLogger

public class LifecycleLogger extends Object
The startup logger
  • 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 configuration
      listenerInfoList - the listener information
    • preapreThrowable

      public String preapreThrowable(Throwable t)
      Convert a Throwable to a String , with message and stack traces extracted and colored according to ColorScheme.
      Parameters:
      t - the Throwable to 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 configuration
      listenerInfoList - the listener information
      Returns:
      the server message
    • prepareResourcePath

      public String prepareResourcePath(IWebServerConfiguration webServerConfiguration)
      Prepare the resource path
      Parameters:
      webServerConfiguration - the web server configuration
      Returns:
      the prepared resource path