1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 """
21 The proton module defines a suite of APIs that implement the AMQP 1.0
22 protocol.
23
24 The proton APIs consist of the following classes:
25
26 - L{Message} -- A class for creating and/or accessing AMQP message content.
27 - L{Data} -- A class for creating and/or accessing arbitrary AMQP encoded
28 data.
29
30 """
31 from __future__ import absolute_import
32
33 import logging
34 import logging.config
35 import os
36
37 from cproton import PN_VERSION_MAJOR, PN_VERSION_MINOR, PN_VERSION_POINT
38
39 from ._condition import Condition
40 from ._data import UNDESCRIBED, Array, Data, Described, char, symbol, timestamp, ubyte, ushort, uint, ulong, \
41 byte, short, int32, float32, decimal32, decimal64, decimal128
42 from ._delivery import Delivery, Disposition
43 from ._endpoints import Endpoint, Connection, Session, Link, Receiver, Sender, Terminus
44 from ._events import Collector, Event, EventType, Handler
45 from ._exceptions import ProtonException, MessageException, DataException, TransportException, \
46 SSLException, SSLUnavailable, ConnectionException, SessionException, LinkException, Timeout, Interrupt
47 from ._message import Message
48 from ._transport import Transport, SASL, SSL, SSLDomain, SSLSessionDetails
49 from ._url import Url
50
51 __all__ = [
52 "API_LANGUAGE",
53 "IMPLEMENTATION_LANGUAGE",
54 "UNDESCRIBED",
55 "Array",
56 "Collector",
57 "Condition",
58 "Connection",
59 "ConnectionException",
60 "Data",
61 "DataException",
62 "Delivery",
63 "Disposition",
64 "Described",
65 "Endpoint",
66 "Event",
67 "EventType",
68 "Handler",
69 "Link",
70 "LinkException",
71 "Message",
72 "MessageException",
73 "ProtonException",
74 "VERSION_MAJOR",
75 "VERSION_MINOR",
76 "Receiver",
77 "SASL",
78 "Sender",
79 "Session",
80 "SessionException",
81 "SSL",
82 "SSLDomain",
83 "SSLSessionDetails",
84 "SSLUnavailable",
85 "SSLException",
86 "Terminus",
87 "Timeout",
88 "Interrupt",
89 "Transport",
90 "TransportException",
91 "Url",
92 "char",
93 "symbol",
94 "timestamp",
95 "ulong",
96 "byte",
97 "short",
98 "int32",
99 "ubyte",
100 "ushort",
101 "uint",
102 "float32",
103 "decimal32",
104 "decimal64",
105 "decimal128"
106 ]
107
108 VERSION_MAJOR = PN_VERSION_MAJOR
109 VERSION_MINOR = PN_VERSION_MINOR
110 VERSION_POINT = PN_VERSION_POINT
111 VERSION = (VERSION_MAJOR, VERSION_MINOR, VERSION_POINT)
112 API_LANGUAGE = "C"
113 IMPLEMENTATION_LANGUAGE = "C"
114
115
116
117
118
122
123 - def emit(self, record):
125
128
129
130 handler = NullHandler()
131
132 logconfigfile = os.getenv('PNPY_LOGGER_CONFIG', None)
133 if logconfigfile:
134 logging.config.fileConfig(logconfigfile, None, False)
135 else:
136 log = logging.getLogger("proton")
137 log.addHandler(handler)
138