final void write ( LogData data ) { checkNotNull ( data , "data" ) ; try { backend . log ( data ) ; } catch ( RuntimeException error ) { try { backend . handleError ( error , data ) ; } catch ( LoggingException allowed ) { // Bypass the catch-all if the exception is deliberately created during error handling. throw allowed ; } catch ( RuntimeException wtf ) { System . err . println ( "logging error: " + wtf . getMessage ( ) ) ; wtf . printStackTrace ( System . err ) ; } } }
Invokes the logging backend to write a log statement .