Logging InputStream

前端 未结 2 1424
日久生厌
日久生厌 2021-01-22 01:39

I create an InputStream class, that extends CiphetInputStream. I want to log all data from my InputStream (that i use as input in parser further) so i done following:

         


        
2条回答
  •  难免孤独
    2021-01-22 02:20

    You can combine TeeInputStream and Logger.stream():

    new TeeInputStream(
      yourStream, 
      Logger.stream(Level.INFO, this)
    );
    

提交回复
热议问题