Skip to content Skip to sidebar Skip to footer

Logging Inputstream

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: public class

Solution 1:

You can combine TeeInputStream and Logger.stream():

newTeeInputStream(
  yourStream, 
  Logger.stream(Level.INFO, this)
);

Solution 2:

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.

Post a Comment for "Logging Inputstream"