public static String fixEndLine(String logMessage){
  if (getLogLevel() == Level.DEBUG) {
    return logMessage;
  }
  return logMessage.replaceAll("\n","");
}

public static String fixEndLine ( String logMessage ) { if ( getLogLevel ( ) == Level . DEBUG ) { return logMessage ; } return logMessage . replaceAll ( "\n" , "" ) ; }
removes all end of lines unless it ' s debug log level .
