call-seq:
    appender << string

 Write the given _string_ to the logging destination "as is" -- no
 layout formatting will be performed.
433001
def <<( str )
    if @closed
      raise RuntimeError,
            "appender '<#{self.class.name}: #{@name}>' is closed"
    end

    unless off?
      begin
        write(str)
      rescue StandardError => err
        ::Logging.log_internal_error(err)
      end
    end
    self
  end
388890
AppendableExpression appendLoggingFunctionInvocation(
      String functionName,
      String placeholderValue,
      List<SoyExpression> args,
      List<Expression> escapingDirectives) {
    return withNewDelegate(
        delegate.invoke(
            APPEND_LOGGING_FUNCTION_INVOCATION,
            LOGGING_FUNCTION_INVOCATION_CREATE.invoke(
                constant(functionName),
                constant(placeholderValue),
                SoyExpression.asBoxedList(args)),
            BytecodeUtils.asImmutableList(escapingDirectives)),
        true);
  }
846024
protected void writeLogging(Definition def, Writer out, int indent, String level, String content, String... params)
         throws IOException
   {
      writeIndent(out, indent);
      if (def.isSupportJbossLogging())
      {
         out.write("log.trace");
         int size = params.length;
         if (size > 0)
            out.write("f");
         out.write("(\"" + content + "(");
         for (int i = 0; i < size; i++)
         {
            out.write("%s");
            if (i < size - 1)
               out.write(", ");
         }
         out.write(")\"");
         for (int i = 0; i < size; i++)
         {
            out.write(", ");
            out.write(params[i]);
         }
         out.write(");");
      }
      else
      {
         out.write("log.finest(\"" + content + "()\");");
      }
      writeEol(out);
   }
858546
static void printToLogFile(String str) {
    try (BufferedWriter bw = new BufferedWriter(new FileWriter(getLogPath(), true))) {
      bw.write(str + logLineBreak);
    } catch (Throwable t) {
      showError(t);
    }
  }
307073
private void writeMethod(Definition def, Writer out, int indent) throws IOException
   {
      if (def.getMcfDefs().get(getNumOfMcf()).isDefineMethodInConnection())
      {
         if (def.getMcfDefs().get(getNumOfMcf()).getMethods().size() > 0)
         {
            for (MethodForConnection method : def.getMcfDefs().get(getNumOfMcf()).getMethods())
            {
               writeMethodSignature(out, indent, method);
               writeLeftCurlyBracket(out, indent);
               writeLogging(def, out, indent + 1, "trace", method.getMethodName());

               if (!method.getReturnType().equals("void"))
               {
                  writeEol(out);
                  if (BasicType.isPrimitiveType(method.getReturnType()))
                  {
                     writeWithIndent(out, indent + 1, "return " + BasicType.defaultValue(method.getReturnType()) + ";");
                  }
                  else
                  {
                     writeWithIndent(out, indent + 1, "return null;");
                  }
               }

               writeRightCurlyBracket(out, indent);
            }
         }
      }
      else
      {
         writeSimpleMethodSignature(out, indent, " * Call me", "void callMe()");
         writeLeftCurlyBracket(out, indent);
         writeLogging(def, out, indent + 1, "trace", "callMe");
         writeRightCurlyBracket(out, indent);
      }
   }
1284084
def write(self, string: str) -> None:
        """"""
        self.logfile.write('\n'.join(
            f'{self._string}{substring}' if substring else ''
            for substring in string.split('\n')))
592229
@Override
	public synchronized String format(LogRecord record) {
        // clear string builder content of previous runs
        BUILDER.setLength(0);

        // build log message
        appendDateTime(record);
        appendApplication();
        appendLevel(record);
        appendClass(record);
        appendMessage(record);
        appendThrowable(record);
        appendNewLine();

        return BUILDER.toString();
    }
1157592
public void append(String msg) {
        verifySystemOut();
        PrintStream printStream = out;
        try {
            if (userInputActive && !appendCalled) {
                printStream.print(moveDownToSkipPrompt());
                appendCalled = true;
            }
            if (msg.endsWith(LINE_SEPARATOR)) {
                printStream.print(msg);
            } else {
                printStream.println(msg);
            }
            cursorMove = 0;
        } finally {
            progressIndicatorActive = false;
        }
    }
1330615
public void toStringRep(String indent, Map<String, String> nss, 
            XNAppender out, Consumer<? super XRepresentationRecord> callback) {
        
        Map<String, String> nss0 = new HashMap<>(nss);
        
        out.append(indent);
        
        if (callback != null) {
            callback.accept(new XRepresentationRecord(XRepresentationState.START_ELEMENT, this, 
                    out.length()));
        }
        out.append("<");
        
        Pair<String, String> pf = createPrefix(nss0, namespace, prefix);
        
        String prefix = pf.first;
        if (prefix != null && prefix.length() > 0) {
            out.append(prefix).append(":");
        }
        out.append(name);

        if (pf.second != null) {
            out.append(pf.second);
        }
        
        if (attributes.size() > 0) {
            for (XAttributeName an : attributes.keySet()) {
                Pair<String, String> pfa = createPrefix(nss0, an.namespace, an.prefix);
                out.append(" ");
                if (pfa.first != null && pfa.first.length() > 0) {
                    out.append(pfa.first).append(":");
                }
                out.append(an.name).append("='").append(sanitize(attributes.get(an))).append("'");
                
                if (pfa.second != null) {
                    out.append(pfa.second);
                }
                
            }
        }
        
        if (children.size() == 0) {
            if (content == null || content.isEmpty()) {
                out.append("/>");
            } else {
                out.append(">");
                if (callback != null) {
                    callback.accept(new XRepresentationRecord(XRepresentationState.START_TEXT, this, out.length()));
                }
                String s = sanitize(content);
                out.append(s);
                if (callback != null) {
                    callback.accept(new XRepresentationRecord(XRepresentationState.END_TEXT, this, out.length()));
                }
                if (s.endsWith("\n")) {
                    out.append(indent);
                }
                out.append("</");
                if (prefix != null && prefix.length() > 0) {
                    out.append(prefix).append(":");
                }
                out.append(name);
                out.append(">");
            }
        } else {
            if (content == null || content.isEmpty()) {
                out.append(String.format(">%n"));
            } else {
                out.append(">");
                if (callback != null) {
                    callback.accept(new XRepresentationRecord(XRepresentationState.START_TEXT, this, out.length()));
                }
                out.append(sanitize(content));
                if (callback != null) {
                    callback.accept(new XRepresentationRecord(XRepresentationState.END_TEXT, this, out.length()));
                }

                out.append(String.format("%n"));
            }
            for (XNElement e : children) {
                e.toStringRep(indent + "  ", nss0, out, callback);
            }
            out.append(indent).append("</");
            if (prefix != null && prefix.length() > 0) {
                out.append(prefix).append(":");
            }
            out.append(name);
            out.append(">");
        }
        if (callback != null) {
            callback.accept(new XRepresentationRecord(XRepresentationState.END_ELEMENT, this, out.length()));
        }
        out.append(String.format("%n"));
    }
425306
def writelines(self, seq):
        
        self._check_writable()
        for line in seq:
            self._transport._can_write.wait()
            self._transport.write(line)
119605
def log(self, string):
        

        self.log_data.append(string)
        if self.log_function is None:
            print(string)
        else:
            self.log_function(string)
684189
static String _dumpAsString(
                                String indent,
                                DERObject obj)
    {
        if (obj instanceof ASN1Sequence)
        {
            StringBuilder buf = new StringBuilder();
            Enumeration e = ((ASN1Sequence) obj).getObjects();
            String tab = indent + TAB;

            buf.append(indent);
            if (obj instanceof BERConstructedSequence)
            {
                buf.append("BER ConstructedSequence");
            }
            else if (obj instanceof DERConstructedSequence)
            {
                buf.append("DER ConstructedSequence");
            }
            else if (obj instanceof BERSequence)
            {
                buf.append("BER Sequence");
            }
            else if (obj instanceof DERSequence)
            {
                buf.append("DER Sequence");
            }
            else
            {
                buf.append("Sequence");
            }

            buf.append(System.getProperty("line.separator"));

            while (e.hasMoreElements())
            {
                Object o = e.nextElement();

                if (o == null || o.equals(new DERNull()))
                {
                    buf.append(tab);
                    buf.append("NULL");
                    buf.append(System.getProperty("line.separator"));
                }
                else if (o instanceof DERObject)
                {
                    buf.append(_dumpAsString(tab, (DERObject) o));
                }
                else
                {
                    buf.append(_dumpAsString(tab, ((DEREncodable) o).getDERObject()));
                }
            }
            return buf.toString();
        }
        else if (obj instanceof DERTaggedObject)
        {
            StringBuilder buf = new StringBuilder();
            String tab = indent + TAB;

            buf.append(indent);
            if (obj instanceof BERTaggedObject)
            {
                buf.append("BER Tagged [");
            }
            else
            {
                buf.append("Tagged [");
            }

            DERTaggedObject o = (DERTaggedObject) obj;

            buf.append(Integer.toString(o.getTagNo()));
            buf.append("]");

            if (!o.isExplicit())
            {
                buf.append(" IMPLICIT ");
            }

            buf.append(System.getProperty("line.separator"));

            if (o.isEmpty())
            {
                buf.append(tab);
                buf.append("EMPTY");
                buf.append(System.getProperty("line.separator"));
            }
            else
            {
                buf.append(_dumpAsString(tab, o.getObject()));
            }

            return buf.toString();
        }
        else if (obj instanceof DERConstructedSet)
        {
            StringBuilder buf = new StringBuilder();
            Enumeration e = ((ASN1Set) obj).getObjects();
            String tab = indent + TAB;

            buf.append(indent);
            buf.append("ConstructedSet");
            buf.append(System.getProperty("line.separator"));

            while (e.hasMoreElements())
            {
                Object o = e.nextElement();

                if (o == null)
                {
                    buf.append(tab);
                    buf.append("NULL");
                    buf.append(System.getProperty("line.separator"));
                }
                else if (o instanceof DERObject)
                {
                    buf.append(_dumpAsString(tab, (DERObject) o));
                }
                else
                {
                    buf.append(_dumpAsString(tab, ((DEREncodable) o).getDERObject()));
                }
            }
            return buf.toString();
        }
        else if (obj instanceof BERSet)
        {
            StringBuilder buf = new StringBuilder();
            Enumeration e = ((ASN1Set) obj).getObjects();
            String tab = indent + TAB;

            buf.append(indent);
            buf.append("BER Set");
            buf.append(System.getProperty("line.separator"));

            while (e.hasMoreElements())
            {
                Object o = e.nextElement();

                if (o == null)
                {
                    buf.append(tab);
                    buf.append("NULL");
                    buf.append(System.getProperty("line.separator"));
                }
                else if (o instanceof DERObject)
                {
                    buf.append(_dumpAsString(tab, (DERObject) o));
                }
                else
                {
                    buf.append(_dumpAsString(tab, ((DEREncodable) o).getDERObject()));
                }
            }
            return buf.toString();
        }
        else if (obj instanceof DERSet)
        {
            StringBuilder buf = new StringBuilder();
            Enumeration e = ((ASN1Set) obj).getObjects();
            String tab = indent + TAB;

            buf.append(indent);
            buf.append("DER Set");
            buf.append(System.getProperty("line.separator"));

            while (e.hasMoreElements())
            {
                Object o = e.nextElement();

                if (o == null)
                {
                    buf.append(tab);
                    buf.append("NULL");
                    buf.append(System.getProperty("line.separator"));
                }
                else if (o instanceof DERObject)
                {
                    buf.append(_dumpAsString(tab, (DERObject) o));
                }
                else
                {
                    buf.append(_dumpAsString(tab, ((DEREncodable) o).getDERObject()));
                }
            }
            return buf.toString();
        }
        else if (obj instanceof DERObjectIdentifier)
        {
            return indent + "ObjectIdentifier(" + ((DERObjectIdentifier) obj).getId() + ")" + System.getProperty("line.separator");
        }
        else if (obj instanceof DERBoolean)
        {
            return indent + "Boolean(" + ((DERBoolean) obj).isTrue() + ")" + System.getProperty("line.separator");
        }
        else if (obj instanceof DERInteger)
        {
            return indent + "Integer(" + ((DERInteger) obj).getValue() + ")" + System.getProperty("line.separator");
        }
        else if (obj instanceof BERConstructedOctetString)
        {
            return indent + "BER Constructed Octet String" + "[" + ((ASN1OctetString) obj).getOctets().length + "] " + System.getProperty("line.separator");
        }
        else if (obj instanceof DEROctetString)
        {
            return indent + "DER Octet String" + "[" + ((ASN1OctetString) obj).getOctets().length + "] " + System.getProperty("line.separator");
        }
        else if (obj instanceof DERBitString)
        {
            return indent + "DER Bit String" + "[" + ((DERBitString) obj).getBytes().length + ", " + ((DERBitString) obj).getPadBits() + "] "
                   + System.getProperty("line.separator");
        }
        else if (obj instanceof DERIA5String)
        {
            return indent + "IA5String(" + ((DERIA5String) obj).getString() + ") " + System.getProperty("line.separator");
        }
        else if (obj instanceof DERUTF8String)
        {
            return indent + "UTF8String(" + ((DERUTF8String) obj).getString() + ") " + System.getProperty("line.separator");
        }
        else if (obj instanceof DERPrintableString)
        {
            return indent + "PrintableString(" + ((DERPrintableString) obj).getString() + ") " + System.getProperty("line.separator");
        }
        else if (obj instanceof DERVisibleString)
        {
            return indent + "VisibleString(" + ((DERVisibleString) obj).getString() + ") " + System.getProperty("line.separator");
        }
        else if (obj instanceof DERBMPString)
        {
            return indent + "BMPString(" + ((DERBMPString) obj).getString() + ") " + System.getProperty("line.separator");
        }
        else if (obj instanceof DERT61String)
        {
            return indent + "T61String(" + ((DERT61String) obj).getString() + ") " + System.getProperty("line.separator");
        }
        else if (obj instanceof DERUTCTime)
        {
            return indent + "UTCTime(" + ((DERUTCTime) obj).getTime() + ") " + System.getProperty("line.separator");
        }
        else if (obj instanceof DERGeneralizedTime)
        {
            return indent + "GeneralizedTime(" + ((DERGeneralizedTime) obj).getTime() + ") " + System.getProperty("line.separator");
        }
        else if (obj instanceof DERUnknownTag)
        {
            //TODO liberty if we keep this find Hex
//            return indent + "Unknown " + Integer.toString(((DERUnknownTag)obj).getTag(), 16) + " " + new String(Hex.encode(((DERUnknownTag)obj).getData())) + System.getProperty("line.separator");
            return indent + "Unknown " + Integer.toString(((DERUnknownTag) obj).getTag(), 16) + " " + new String(((DERUnknownTag) obj).getData())
                   + System.getProperty("line.separator");
        }
        else
        {
            return indent + obj.toString() + System.getProperty("line.separator");
        }
    }
202601
void append(String s) throws IOException {
    if (closed) throw new IllegalStateException("closed");

    if (nextFlush != null) {
      int nextNewline = s.indexOf('\n');

      // If s doesn't cause the current line to cross the limit, buffer it and return. We'll decide
      // whether or not we have to wrap it later.
      if (nextNewline == -1 && column + s.length() <= columnLimit) {
        buffer.append(s);
        column += s.length();
        return;
      }

      // Wrap if appending s would overflow the current line.
      boolean wrap = nextNewline == -1 || column + nextNewline > columnLimit;
      flush(wrap ? FlushType.WRAP : nextFlush);
    }

    out.append(s);
    int lastNewline = s.lastIndexOf('\n');
    column = lastNewline != -1
        ? s.length() - lastNewline - 1
        : column + s.length();
  }
605643
@Override
    public synchronized String format(LogRecord record) {
        cachedDate.setTime(record.getMillis());
        final StringBuilder sb = new StringBuilder();
        sb.append(cachedFormat.format(cachedDate));
        sb.append(" [").append(Thread.currentThread().getName()).append("]");
        sb.append(" ").append(record.getLevel().getName());
        sb.append(" (");
        final String className = record.getSourceClassName();
        if (className != null) {
            if (className.contains(".")) {
                sb.append(className.substring(className.lastIndexOf(".") + ".".length()));
            } else {
                sb.append(className);
            }
            final String methodName = record.getSourceMethodName();
            if (methodName != null) {
                sb.append("@").append(methodName).append("()");
            }
        } else {
            sb.append(record.getLoggerName());
        }
        sb.append(") - ").append(formatMessage(record));
        final Throwable thrown = record.getThrown();
        if (thrown != null) {
            final StringWriter stringWriter = new StringWriter();
            final PrintWriter printWriter = new PrintWriter(stringWriter);
            try {
                printWriter.println();
                thrown.printStackTrace(printWriter);
            } finally {
                printWriter.close();
            }
            sb.append(stringWriter.toString());
        }
        sb.append("\n");
        return sb.toString();
    }
609227
public void write(String[] nextLine) {
    if (nextLine == null) return;
    StringBuilder sb = new StringBuilder(INITIAL_STRING_SIZE);
    for (int i = 0; i < nextLine.length; i++) {
      if (i != 0) {
        sb.append(format.defaultSeparator());
      }

      String nextElement = nextLine[i];
      if (nextElement == null) continue;
      if (!format.isDelimiter(NO_QUOTE_CHARACTER)) sb.append(format.getDelimiter());

      sb.append(stringContainsSpecialCharacters(nextElement) ? processLine(nextElement) : nextElement);

      if (!format.isDelimiter(NO_QUOTE_CHARACTER)) sb.append(format.getDelimiter());
    }
    sb.append(lineEnd);
    pw.write(sb.toString());

  }
484282
protected void append(String v, int start, int end) {
        try {
            writer.write(v, start, end - start);
        } catch (Exception e) {
            throw MwsUtl.wrap(e);
        }
    }
237994
def write(str)
      while !str.empty?
        pre,mid,str = str.partition("\n")
        write_str(pre) unless pre.empty?
        writeln unless mid.empty?
      end
    end