Merging multiple log files by date including multilines

后端 未结 5 1394
误落风尘
误落风尘 2021-02-07 13:15

I have several logs containing lines all starting with a timestamp, so that the following works as expected to merge them:

cat myLog1.txt myLog2.txt | sort -n &g         


        
5条回答
  •  北海茫月
    2021-02-07 14:02

    The open source tool (Java GitHub) lets you combine log files with different formats including multilines into a merged file.

    The tool allows to shift the time of records in a log file. It can be useful when files come from different time zones.

    It also allows to generate additional information to a merged file, for example applications names or timestamps in a uniform format, see the example.

    The tool can be used as a command line tool or Java library. Note: I'm the author.

提交回复
热议问题