PubNub LogoDocs
SupportContact SalesLoginTry Our APIs

›ruby

ruby

  • Getting Started
  • API Reference

    • Configuration
    • Publish & Subscribe
    • Presence
    • Access Manager
    • Channel Groups
    • Message Persistence
    • Mobile Push
    • Objects
    • Miscellaneous
  • Status Events
  • Troubleshooting
  • Change Log
  • Feature Support
  • Platform Support
  • Reconnection Policies

Troubleshooting PubNub Ruby SDK

How to enable logging

By default the PubNub SDK keeps logs in pubnub.log located in the script direcotry. You can pass a custom logger as :logger parameter during initialization of the client.

Note

Always set the UUID to uniquely identify the user or device that connects to PubNub. This UUID should be persisted, and should remain unchanged for the lifetime of the user or the device. If you don't set the UUID, you won't be able to connect to PubNub.

logger = Logger.new(...)
logger.level = Logger::DEBUG

pubnub = Pubnub.new(
    subscribe_key: :demo,
    publish_key: :demo,
    logger: logger
)

How to find the version of your SDK

The version is contained in the VERSION constant in the Pubnub module.

Pubnub::VERSION
← Status EventsChange Log →
  • How to enable logging
  • How to find the version of your SDK
© PubNub Inc. - Privacy Policy