def canonical_write( str )
      return self if @io.nil?

      str = str.force_encoding(encoding) if encoding and str.encoding != encoding
      @io.flock_sh { @io.syswrite str }

      if roll_required?
        @io.flock? {
          @age_fn_mtime = nil
          copy_truncate if roll_required?
        }
        @roller.roll_files
      end
      self
    rescue StandardError => err
      self.level = :off
      ::Logsly::Logging182.log_internal {"appender #{name.inspect} has been disabled"}
      ::Logsly::Logging182.log_internal(-2) {err}
    end
def canonical_write( str )
      return self if @io.nil?

      str = str.force_encoding(encoding) if encoding and str.encoding != encoding
      @io.flock_sh { @io.syswrite str }

      if roll_required?
        @io.flock? {
          @age_fn_mtime = nil
          copy_truncate if roll_required?
        }
        @roller.roll_files
      end
      self
    rescue StandardError => err
      self.level = :off
      ::Logsly::Logging182.log_internal {"appender #{name.inspect} has been disabled"}
      ::Logsly::Logging182.log_internal(-2) {err}
    end
Write the given _event_ to the log file. The log file will be rolled
 if the maximum file size is exceeded or if the file is older than the
 maximum age.