Это мой файл журнала:
2018-11-16 01:55:57,102 ERROR [LLLL-1 task-22] c.f.s.p.search.SearchResourceHelper - Error while processing request http://test.com/search-webservice/search?n=20&sf=9-900_60000%2c23-55616&s=1&r=0&t=3&nm=425862&sl=1.0&fs=0&nkr=1&m=1&ct=FParamResolverServiceImplParamResolverServiceImplParamResolverServiceImplParamResolverServiceImplParamResolverServiceImpl
2018-11-16 01:55:57,118 ERROR [PPPP-1 task-22] c.f.s.p.search.SearchResourceHelper - null
java.lang.NullPointerException: null
2018-11-16 04:10:34,346 ERROR [YYYY-1 task-13] c.f.s.p.s.ParamResolverServiceImpl - filter key not valid: 6.
2018-11-16 04:10:34,346 ERROR [AAAA-1 task-13] c.f.s.p.s.ParamResolverServiceImpl - Unknown filter key 6
2018-11-16 04:10:34,346 ERROR [CCCC-1 task-13] c.f.s.p.search.SearchResourceHelper - Validation error while processing request http://testParamResolverServiceImplParamResolverServiceImplParamResolverServiceImplParamResolverServiceImplParamResolverServiceImpl
2018-11-16 04:10:34,362 ERROR [XNIO-1 task-13] c.f.s.p.search.SearchResourceHelper - Unknown filter key 6
javax.validation.ValidationException: Unknown filter key 6
Это мой код:
$date = Get-Date -UFormat '%Y'
Import-Csv -Path C:\server2.log -Delimiter "," -Header Date, Message | Select -First 8
Однако, есть возврат каретки, поэтому я получаю это:
Date Message
---- -------
2018-11-16 01:55:57 102 ERROR [XNIO-1 task-22] c.f.s.p.search.SearchResourceHelper - Error while processing...
2018-11-16 01:55:57 118 ERROR [XNIO-1 task-22] c.f.s.p.search.SearchResourceHelper - null
java.lang.NullPointerException: null
2018-11-16 04:10:34 346 ERROR [XNIO-1 task-13] c.f.s.p.s.ParamResolverServiceImpl - filter key not valid: 6.
2018-11-16 04:10:34 346 ERROR [XNIO-1 task-13] c.f.s.p.s.ParamResolverServiceImpl - Unknown filter key 6
2018-11-16 04:10:34 346 ERROR [XNIO-1 task-13] c.f.s.p.search.SearchResourceHelper - Validation error while...
2018-11-16 04:10:34 362 ERROR [XNIO-1 task-13] c.f.s.p.search.SearchResourceHelper - Unknown filter key 6
javax.validation.ValidationException: Unknown filter key 6
Однако как справиться с возвратом каретки?