| | |
| | | } catch (IOException e1) {
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | public static void oppoError(Throwable e) {
|
| | | String date = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy_MM_dd");
|
| | | String os = System.getProperty("os.name");
|
| | | String filePath = String.format("/usr/local/tomcat8/logs/push/oppo_error_detail_%s.txt", date);
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | filePath = String.format("C:/logs/push/oppo_error_detail_%s.txt", date);
|
| | | }
|
| | |
|
| | | try {
|
| | | saveErrorLog(e, filePath);
|
| | | } catch (IOException e1) {
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | public static void vivoError(Throwable e) {
|
| | | String date = TimeUtil.getGernalTime(System.currentTimeMillis(), "yyyy_MM_dd");
|
| | | String os = System.getProperty("os.name");
|
| | | String filePath = String.format("/usr/local/tomcat8/logs/push/vivo_error_detail_%s.txt", date);
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | filePath = String.format("C:/logs/push/vivo_error_detail_%s.txt", date);
|
| | | }
|
| | |
|
| | | try {
|
| | | saveErrorLog(e, filePath);
|
| | | } catch (IOException e1) {
|
| | | }
|
| | | }
|
| | |
|
| | | public static void saveErrorLog(Throwable e, String filePath) throws IOException {
|
| | | // 创建文件夹
|