Class: Tlogger

### Home Classes Methods

### In Files

- test/tlogger.rb

### Parent

Object

### Methods

- ::new
- #on_hbfire
- #on_hbread_fail
- #on_hbwrite_fail
- #on_miscerr

### Files

- CHANGELOG.rdoc
- LICENSE

### Class/Module Index

Quicksearch

- Stomp
- Stomp::Client
- Stomp::Connection
- Stomp::Error
- Stomp::Error::BrokerException
- Stomp::Error::ConnectReadTimeout
- Stomp::Error::DuplicateSubscription
- Stomp::Error::InvalidFormat
- Stomp::Error::InvalidHeartBeatHeaderError
- Stomp::Error::InvalidMessageLength
- Stomp::Error::InvalidServerCommand
- Stomp::Error::LoggerConnectionError
- Stomp::Error::MalformedFailoverOptionsError
- Stomp::Error::MaxReconnectAttempts
- Stomp::Error::MessageIDRequiredError
- Stomp::Error::NilMessageError
- Stomp::Error::NoCurrentConnection
- Stomp::Error::PacketParsingTimeout
- Stomp::Error::ProducerFlowControlException
- Stomp::Error::ProtocolError11p
- Stomp::Error::ProtocolErrorConnect
- Stomp::Error::ProtocolErrorEmptyHeaderKey
- Stomp::Error::ProtocolErrorEmptyHeaderValue
- Stomp::Error::ProtocolException
- Stomp::Error::ReadReceiptTimeoutException
- Stomp::Error::SSLClientParamsError
- Stomp::Error::SSLNoCertFileError
- Stomp::Error::SSLNoKeyFileError
- Stomp::Error::SSLNoTruststoreFileError
- Stomp::Error::SSLUnreadableCertFileError
- Stomp::Error::SSLUnreadableKeyFileError
- Stomp::Error::SSLUnreadableTruststoreFileError
- Stomp::Error::SocketOpenTimeout
- Stomp::Error::StartTimeoutException
- Stomp::Error::StompException
- Stomp::Error::StompServerError
- Stomp::Error::SubscriptionRequiredError
- Stomp::Error::UTF8ValidationError
- Stomp::Error::UnsupportedProtocolError
- Stomp::HeaderCodec
- Stomp::Message
- Stomp::NullLogger
- Stomp::SSLParams
- Client11Example1
- Client11PutGet1
- Connection11Example1
- Connection11Example2
- ExampleConsumer
- ExamplePublisher
- ExampleRubyCiphers
- ExampleSSL1
- ExampleSSL1C
- ExampleSSL2
- ExampleSSL2C
- ExampleSSL3
- ExampleSSL3C
- ExampleSSL4
- ExampleSSL4C
- ExampleSSLCtxOptions
- ExampleSSLNewParm
- ExampleTopicConsumer
- ExampleTopicPublisher
- Hash
- HeartBeatExample1
- LoggerExample
- Object
- Publish11Example1
- Receive11Example1
- Receive11Example2
- RepeatedHeadersExample
- SSLLoggerExample
- Slogger
- Stomp11Common
- TestAnonymous
- TestBase
- TestClient
- TestConnection
- TestConnection1P
- TestMessage
- TestSSL
- TestURLLogins
- Tlogger

No matching classes.

# Tlogger

Callback logger for Stomp 1.1+ heartbeat tests.

See the examples directory for a more robust logger example.

### Public Class Methods

new(init_parms = nil) click to toggle source

Initialize a callback logger class.

    # File test/tlogger.rb, line 14
    def initialize(init_parms = nil)
      puts
      @log = Logger::new(STDOUT)          # User preference
      @log.level = Logger::DEBUG          # User preference
      @log.info("Logger initialization complete.")
    end

### Public Instance Methods

on_hbfire(parms, type, firedata) click to toggle source

Stomp 1.1+ - heart beat thread fires

    # File test/tlogger.rb, line 53
    def on_hbfire(parms, type, firedata)
      begin
        @log.debug "HBfire #{type} " + "=" * 30
        @log.debug "HBfire #{type} Parms #{info(parms)}"
        @log.debug "HBfire #{type} Firedata #{firedata.inspect}"
      rescue
        @log.debug "HBfire #{type} oops"
      end
    end

on_hbread_fail(parms, ticker_data) click to toggle source

Stomp 1.1+ - heart beat read (receive) failed

    # File test/tlogger.rb, line 43
    def on_hbread_fail(parms, ticker_data)
      begin
        @log.debug "Hbreadf Parms #{info(parms)}"
        @log.debug "Hbreadf Result #{ticker_data.inspect}"
      rescue
        @log.debug "Hbreadf oops"
      end
    end

on_hbwrite_fail(parms, ticker_data) click to toggle source

Stomp 1.1+ - heart beat send (transmit) failed

    # File test/tlogger.rb, line 32
    def on_hbwrite_fail(parms, ticker_data)
      begin
        @log.debug "Hbwritef Parms #{info(parms)}"
        @log.debug "Hbwritef Result #{ticker_data.inspect}"
      rescue
        @log.debug "Hbwritef oops"
      end
    end

on_miscerr(parms, errstr) click to toggle source

Log miscellaneous errors.

    # File test/tlogger.rb, line 22
    def on_miscerr(parms, errstr)
      begin
        @log.debug "Miscellaneous Error #{info(parms)}"
        @log.debug "Miscellaneous Error String #{errstr}"
      rescue
        @log.debug "Miscellaneous Error oops"
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.