Logger 与Log4j 使用介绍

Logger

  • 可以设置全局TAG,二级TAG.设置输出函数调用层级数.当前调用线

Logger.init(“HotApp”).methodCount(5)


  • 可以格式化输出json xml wtf简单明了. 

08-18 11:04:01.730 32500-32500 D/HotApp: ║ { 
08-18 11:04:01.730 32500-32500 D/HotApp: ║ “apkName”: “XXXX”, 
08-18 11:04:01.730 32500-32500 D/HotApp: ║ “packetName”: “XXXXX”, 
08-18 11:04:01.730 32500-32500 D/HotApp: ║ “version”: “1.1.17”, 
08-18 11:04:01.730 32500-32500 D/HotApp: ║ “downloadurl”: ” 
08-18 11:04:01.730 32500-32500 D/HotApp: ║ “fileSize”: “3.9MB”, 
08-18 11:04:01.730 32500-32500 D/HotApp: ║ },


你可能感兴趣的:(Android)