| 168 | printFile(tag, targetDirectory, fileName, msg); |
| 169 | } |
| 170 | private static void printLog(int type, String tagStr, Object... objects) { |
| 171 | |
| 172 | if (!IS_SHOW_LOG) { |
| 173 | return; |
| 174 | } |
| 175 | |
| 176 | String[] contents = wrapperContent(tagStr, objects); |
| 177 | String tag = contents[0]; |
| 178 | String msg = contents[1]; |
| 179 | String headString = contents[2]; |
| 180 | |
| 181 | switch (type) { |
| 182 | case V: |
| 183 | case D: |
| 184 | case I: |
| 185 | case W: |
| 186 | case E: |
| 187 | case A: |
| 188 | BaseLog.printDefault(type, tag, headString + msg); |
| 189 | break; |
| 190 | case JSON: |
| 191 | JsonLog.printJson(tag, msg, headString); |
| 192 | break; |
| 193 | case XML: |
| 194 | XmlLog.printXml(tag, msg, headString); |
| 195 | break; |
| 196 | } |
| 197 | } |
| 198 | |
| 199 | |
| 200 | private static void printFile(String tagStr, File targetDirectory, String fileName, Object |