I'm trying to ident some information using logger.info (extract from a log file)
I need to keep the spaces in from of the string, but looks like logger.info is triming spaces at the beginning of a string, and even if i add a char before it concats all following spaces into one
groovy:
def test =" test";
logger.info("{}",test);
test = "_"+test;
logger.info("{}",test);
logger.info("{}",test.replace(' ','_')
Result
10:19:37,522 INFO - Running step...
10:19:37,537 INFO - test
10:19:37,537 INFO - _ test
10:19:37,538 INFO - _______test
Is there a way to force the spaces to be dispayed ?
Thanks