Resrservice docs 1st part

This commit is contained in:
Filip Izydorczyk
2021-01-15 17:45:29 +01:00
parent 061c3a24fe
commit f77213a01e
25 changed files with 406 additions and 35 deletions

View File

@ -3,6 +3,9 @@ package com.plannaplan;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
/**
* Class to generate logo string on start application and make logs info
*/
public class Logo {
public static final String ANSI_RESET = "\u001B[0m";
@ -35,6 +38,11 @@ ANSI_RESET;
}
/**
* return init string to log
* @param isDev is spring profile dev
* @return string to print in log
*/
public static String getInitInfo(boolean isDev){
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
LocalDateTime now = LocalDateTime.now();
@ -45,6 +53,11 @@ ANSI_RESET;
return ANSI_BLACK + dtf.format(now) + ANSI_YELLOW + " plannaplan" + ANSI_RESET + " initializing [" +ANSI_BLUE + "prod" + ANSI_RESET +"]";
}
/**
* return start string to log
* @param isDev is spring profile dev
* @return string to print in log
*/
public static String getStartedInfo(boolean isDev){
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.SSS");
LocalDateTime now = LocalDateTime.now();