public static String dump ( String logDir ) throws IOException { String path = null ; final VoltTrace tracer = s_tracer ; if ( tracer != null ) { final File dir = new File ( logDir ) ; if ( ! dir . getParentFile ( ) . canWrite ( ) || ! dir . getParentFile ( ) . canExecute ( ) ) { throw new IOException ( "Trace log parent directory " + dir . getParentFile ( ) . getAbsolutePath ( ) + " is not writable" ) ; } if ( ! dir . exists ( ) ) { if ( ! dir . mkdir ( ) ) { throw new IOException ( "Failed to create trace log directory " + dir . getAbsolutePath ( ) ) ; } } try { path = tracer . write ( logDir ) ; } catch ( Exception e ) { s_logger . info ( "Unable to write trace file: " + e . getMessage ( ) , e ) ; } } return path ; }
Write all trace events in the queue to file .