CommonTracerManager { public static void reportProfile(CommonLogSpan sofaTracerSpan) { if (sofaTracerSpan == null) { return; } sofaTracerSpan.setLogType(TracerSystemLogEnum.RPC_PROFILE.getDefaultLogName()); commonReporterAsyncManager.append(sofaTracerSpan); }  static void register(String logFileName, String rollingPolicy, String logReserveDay); @Deprecated static void register(char logType, String logFileName, String rollingPolicy,
                                String logReserveDay); static boolean isAppenderExist(String logType); static void reportCommonSpan(CommonLogSpan commonLogSpan); static void reportProfile(CommonLogSpan sofaTracerSpan); static void reportError(CommonLogSpan sofaTracerSpan);  }
@Test public void testReportProfile() throws Exception { String logType = TracerSystemLogEnum.MIDDLEWARE_ERROR.getDefaultLogName(); CommonTracerManager.reportError(new CommonLogSpan(this.sofaTracer, System .currentTimeMillis(), "testReportProfile", SofaTracerSpanContext.rootStart(), null)); TestUtil.waitForAsyncLog(); File file = customFileLog(logType); assertTrue(file.exists()); List<String> errorContents = FileUtils.readLines(file); assertTrue(errorContents.toString(), errorContents.size() == 1); }