public synchronized boolean log(WsByteBuffer data) {
        if (null == data) {
            // return failure
            return false;
        }
        // if we've stopped then there is no worker to hand this to; however, the
        // caller does not expect to have to release buffers handed to the
        // logger so do that here first
        if (State.RUNNING != this.state) {
            data.release();
            return false;
        }
        int length = data.remaining();
        if (isOverFileLimit(length)) {
            rotate();
        }
        boolean rc = true;
        int bytesWritten = 0;
        try {
            ByteBuffer buffer = data.getWrappedByteBuffer();
            while (bytesWritten < length) {
                bytesWritten += this.myChannel.write(buffer);
            }
        } catch (Exception e) {
            FFDCFilter.processException(e, getClass().getName() + ".log", "166", this);
            if (TraceComponent.isAnyTracingEnabled() && tc.isEventEnabled()) {
                Tr.event(tc, getFileName() + ": error writing to log; " + e);
            }
            rc = false;
        } finally {
            data.release();
        }
        return rc;
    }
public synchronized boolean log ( WsByteBuffer data ) { if ( null == data ) { return false ; } if ( State . RUNNING != this . state ) { data . release ( ) ; return false ; } int length = data . remaining ( ) ; if ( isOverFileLimit ( length ) ) { rotate ( ) ; } boolean rc = true ; int bytesWritten = 0 ; try { ByteBuffer buffer = data . getWrappedByteBuffer ( ) ; while ( bytesWritten < length ) { bytesWritten += this . myChannel . write ( buffer ) ; } } catch ( Exception e ) { FFDCFilter . processException ( e , getClass ( ) . getName ( ) + ".log" , "166" , this ) ; if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEventEnabled ( ) ) { Tr . event ( tc , getFileName ( ) + ": error writing to log; " + e ) ; } rc = false ; } finally { data . release ( ) ; } return rc ; }
Log the given data to the log file. If this returns false, then the input
buffer has also been released, the same as if it was successfully written
to the logfile.

@param data
@return boolean (true means it succeeded)