@Override protected void fillBuffer(CyclicBuffer<ILoggingEvent> cb, StringBuffer sbuf) { int len = cb.length(); for (int i = 0; i < len; i++) { ILoggingEvent event = cb.get(); sbuf.append(layout.doLayout(event)); } }
@Override protected void append(E loggingEvent) { syslog.log(getSeverityForEvent(loggingEvent), layout.doLayout(loggingEvent)); }
@Override protected void append(ILoggingEvent event) { synchronized (this) { Level level = event.getLevel(); String msg = layout.doLayout(event); store(level, msg); if (listener != null && level.isGreaterOrEqual(listener.getFilterLevel())) { listener.onAppend(msg); } } }
/** * Info,error,warn,callback method implementation */ @Override protected void append(ILoggingEvent event) { if (!isStarted()) { return; } String logStr = this.layout.doLayout(event); try { Message msg = new Message(topic, tag, logStr.getBytes()); msg.getProperties().put(ProducerInstance.APPENDER_TYPE, ProducerInstance.LOGBACK_APPENDER); //Send message and do not wait for the ack from the message broker. producer.sendOneway(msg); } catch (Exception e) { addError("Could not send message in RocketmqLogbackAppender [" + name + "]. Message is : " + logStr, e); } }
public void doEncode(E event) throws IOException { String txt = layout.doLayout(event); outputStream.write(convertToBytes(txt)); if (immediateFlush) outputStream.flush(); }
@Override protected void fillBuffer(CyclicBuffer<ILoggingEvent> cb, StringBuffer sbuf) { int len = cb.length(); for (int i = 0; i < len; i++) { ILoggingEvent event = cb.get(); sbuf.append(layout.doLayout(event)); } }
@Override public void append(ILoggingEvent event) { if (!isStarted()) { return; } Layout<ILoggingEvent> layout = encoder.getLayout(); if (nonNull(layout)) { doAppendMessage(encoder.getLayout().doLayout(event), event); } }
@Override protected void append(E eventObject) { if (!isStarted()) { return; } try { String msg = layout.doLayout(eventObject); if(msg == null) { return; } if (msg.length() > maxMessageSize) { msg = msg.substring(0, maxMessageSize); } sos.write(msg.getBytes()); sos.flush(); postProcess(eventObject, sos); } catch (IOException ioe) { addError("Failed to send diagram to " + syslogHost, ioe); } }
/** * Info,error,warn,callback method implementation */ @Override protected void append(ILoggingEvent event) { if (!isStarted()) { return; } String logStr = this.layout.doLayout(event); try { Message msg = new Message(topic, tag, logStr.getBytes()); msg.getProperties().put(ProducerInstance.APPENDER_TYPE, ProducerInstance.LOGBACK_APPENDER); //Send message and do not wait for the ack from the message broker. producer.sendOneway(msg); } catch (Exception e) { addError("Could not send message in RocketmqLogbackAppender [" + name + "]. Message is : " + logStr, e); } }
subjectStr = subjectLayout.doLayout(lastEventObject);
@Override protected void append(ILoggingEvent loggingEvent) { // note that AppenderBase.doAppend will invoke this method only if // this appender was successfully started. String eventAsStr = this.layout.doLayout(loggingEvent); System.out.println(eventAsStr); }
public void append(ILoggingEvent event) { if (counter >= limit) { return; } // output the events as formatted by patternLayout String eventStr = this.layout.doLayout(event); System.out.print(eventStr); // prepare for next event counter++; }
public List<String> getLogs(String collectorKey) { List<ILoggingEvent> eventList = logEvents.get(collectorKey); if (eventList == null) { return Collections.emptyList(); } List<String> result = new ArrayList<String>(eventList.size()); for (ILoggingEvent e : eventList) { result.add(layout.doLayout(e)); } return result; }
public void doEncode(E event) throws IOException { String txt = layout.doLayout(event); outputStream.write(convertToBytes(txt)); if (immediateFlush) outputStream.flush(); }
public byte[] encode(E event) { String txt = layout.doLayout(event); return convertToBytes(txt); }
@Override protected void fillBuffer(CyclicBuffer<ILoggingEvent> cb, StringBuffer sbuf) { int len = cb.length(); for (int i = 0; i < len; i++) { ILoggingEvent event = cb.get(); sbuf.append(layout.doLayout(event)); } }
@Override protected void append(E eventObject) { String res = layout.doLayout(eventObject); strList.add(res); }
@Override protected void fillBuffer(CyclicBuffer<ILoggingEvent> cb, StringBuffer sbuf) { int len = cb.length(); for (int i = 0; i < len; i++) { ILoggingEvent event = cb.get(); sbuf.append(layout.doLayout(event)); } }
@Override protected void fillBuffer(CyclicBuffer<IAccessEvent> cb, StringBuffer sbuf) { int len = cb.length(); for (int i = 0; i < len; i++) { // sbuf.append(MimeUtility.encodeText(layout.format(cb.getOrCreate()))); IAccessEvent event = cb.get(); sbuf.append(layout.doLayout(event)); } }
public byte[] encode(ILoggingEvent event) { String txt = layout.doLayout(event); txt = removeSensitiveData(txt); return convertToBytes(txt); }