Logging InputStream

前端 未结 2 1402
日久生厌
日久生厌 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:02

    If you want to see log in logcat, try Log.i(String tag, String message); or System.out.println("");. Both of them works. You can also use, Log.d, Log.w and Log.e also.

    0 讨论(0)
  • 2021-01-22 02:20

    You can combine TeeInputStream and Logger.stream():

    new TeeInputStream(
      yourStream, 
      Logger.stream(Level.INFO, this)
    );
    
    0 讨论(0)
提交回复
热议问题