@Override public void enableLogBytes() { this.configuration.getLoggingOptions().setLogBytes(true); }
sessionConfig.setSystemType(Context.getConfig().getString("sms.smpp.systemType", null)); sessionConfig.setPassword(Context.getConfig().getString("sms.smpp.password", "password")); sessionConfig.getLoggingOptions().setLogBytes(false); sessionConfig.getLoggingOptions().setLogPdu(Context.getConfig().getBoolean("sms.smpp.logPdu"));
/** * Creates a new instance with the specified logger name. */ public SmppSessionLogger(String name) { this(name, new LoggingOptions()); }
sessionConfiguration.setInterfaceVersion(bindRequest.getInterfaceVersion()); LoggingOptions loggingOptions = new LoggingOptions(); loggingOptions.setLogPdu(true); sessionConfiguration.setLoggingOptions(loggingOptions);
@Override public void disableLogPdu() { this.configuration.getLoggingOptions().setLogPdu(false); } }
if (configuration.getLoggingOptions().isLogPduEnabled()) { logger.info("send PDU: {}", pdu);
/** * Logs the specified event to the {@link InternalLogger} returned by * {@link #getLogger()}. If hex dump has been enabled for this handler, * the hex dump of the {@link ChannelBuffer} in a {@link MessageEvent} will * be logged together. */ protected void log(Direction direction, ChannelEvent evt) { // handle logging of message events (PDU, ChannelBuffer, etc.) if (evt instanceof MessageEvent) { MessageEvent me = (MessageEvent)evt; // handle logging of bytes write/read if ((me.getMessage() instanceof ChannelBuffer) && this.options.isLogBytesEnabled()) { ChannelBuffer buffer = (ChannelBuffer)me.getMessage(); if (direction == Direction.UP) { logger.info("read bytes: [{}]", hexDump(buffer)); } else if (direction == Direction.DOWN) { logger.info("write bytes: [{}]", hexDump(buffer)); } } } }
sessionConfiguration.setInterfaceVersion(bindRequest.getInterfaceVersion()); LoggingOptions loggingOptions = new LoggingOptions(); loggingOptions.setLogPdu(true); sessionConfiguration.setLoggingOptions(loggingOptions);
@Override public void disableLogPdu() { this.configuration.getLoggingOptions().setLogPdu(false); } }
if (configuration.getLoggingOptions().isLogPduEnabled()) { logger.info("send PDU: {}", pdu);
/** * Logs the specified event to the {@link InternalLogger} returned by * {@link #getLogger()}. If hex dump has been enabled for this handler, * the hex dump of the {@link ChannelBuffer} in a {@link MessageEvent} will * be logged together. */ protected void log(Direction direction, ChannelEvent evt) { // handle logging of message events (PDU, ChannelBuffer, etc.) if (evt instanceof MessageEvent) { MessageEvent me = (MessageEvent)evt; // handle logging of bytes write/read if ((me.getMessage() instanceof ChannelBuffer) && this.options.isLogBytesEnabled()) { ChannelBuffer buffer = (ChannelBuffer)me.getMessage(); if (direction == Direction.UP) { logger.info("read bytes: [{}]", hexDump(buffer)); } else if (direction == Direction.DOWN) { logger.info("write bytes: [{}]", hexDump(buffer)); } } } }
@Override public void enableLogBytes() { this.configuration.getLoggingOptions().setLogBytes(true); }
session.getConfiguration().getLoggingOptions().setLogBytes(false); session.getConfiguration().getLoggingOptions().setLogPdu(false);
sessionConfiguration.setInterfaceVersion(bindRequest.getInterfaceVersion()); LoggingOptions loggingOptions = new LoggingOptions(); loggingOptions.setLogPdu(true); sessionConfiguration.setLoggingOptions(loggingOptions);
@Override public void enableLogPdu() { this.configuration.getLoggingOptions().setLogPdu(true); }
if (configuration.getLoggingOptions().isLogPduEnabled()) { logger.info("send PDU: {}", pdu);
/** * Creates a new instance with the specified logger name. */ public SmppSessionLogger(String name) { this(name, new LoggingOptions()); }
/** * Logs the specified event to the {@link InternalLogger} returned by * {@link #getLogger()}. If hex dump has been enabled for this handler, * the hex dump of the {@link ChannelBuffer} in a {@link MessageEvent} will * be logged together. */ protected void log(Direction direction, ChannelEvent evt) { // handle logging of message events (PDU, ChannelBuffer, etc.) if (evt instanceof MessageEvent) { MessageEvent me = (MessageEvent)evt; // handle logging of bytes write/read if ((me.getMessage() instanceof ChannelBuffer) && this.options.isLogBytesEnabled()) { ChannelBuffer buffer = (ChannelBuffer)me.getMessage(); if (direction == Direction.UP) { logger.info("read bytes: [{}]", hexDump(buffer)); } else if (direction == Direction.DOWN) { logger.info("write bytes: [{}]", hexDump(buffer)); } } } }
@Override public void disableLogBytes() { this.configuration.getLoggingOptions().setLogBytes(false); }
session.getConfiguration().getLoggingOptions().setLogBytes(false); session.getConfiguration().getLoggingOptions().setLogPdu(false);