File: logger.py

package info (click to toggle)
freenub 0.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,168 kB
  • sloc: python: 10,664; makefile: 7; sh: 6
file content (15 lines) | stat: -rw-r--r-- 364 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import logging
import sys

sys.path.append("../")

import pubnub
from examples import pnconf
from pubnub.pubnub import PubNub

# Default log-level is ERROR, to override it use pubnub.set_stream_logger helper:
pubnub.set_stream_logger("pubnub", logging.DEBUG, stream=sys.stdout)

pubnub = PubNub(pnconf)

pubnub.publish().channel("logging").message("hello").sync()