logxpy 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. logxpy-0.1.0/LICENSE +201 -0
  2. logxpy-0.1.0/MANIFEST.in +8 -0
  3. logxpy-0.1.0/PKG-INFO +100 -0
  4. logxpy-0.1.0/README.rst +44 -0
  5. logxpy-0.1.0/benchmarks/logwriter.py +49 -0
  6. logxpy-0.1.0/benchmarks/serialization.py +41 -0
  7. logxpy-0.1.0/benchmarks/serialization_complex.py +41 -0
  8. logxpy-0.1.0/docs/Makefile +177 -0
  9. logxpy-0.1.0/docs/make.bat +242 -0
  10. logxpy-0.1.0/docs/source/conf.py +267 -0
  11. logxpy-0.1.0/docs/source/development.rst +9 -0
  12. logxpy-0.1.0/docs/source/generating/actions.rst +235 -0
  13. logxpy-0.1.0/docs/source/generating/asyncio.rst +71 -0
  14. logxpy-0.1.0/docs/source/generating/errors.rst +55 -0
  15. logxpy-0.1.0/docs/source/generating/index.rst +16 -0
  16. logxpy-0.1.0/docs/source/generating/loglevels.rst +31 -0
  17. logxpy-0.1.0/docs/source/generating/messages.rst +35 -0
  18. logxpy-0.1.0/docs/source/generating/migrating.rst +66 -0
  19. logxpy-0.1.0/docs/source/generating/testing.rst +288 -0
  20. logxpy-0.1.0/docs/source/generating/threads.rst +131 -0
  21. logxpy-0.1.0/docs/source/generating/twisted.rst +143 -0
  22. logxpy-0.1.0/docs/source/generating/types.rst +201 -0
  23. logxpy-0.1.0/docs/source/index.rst +69 -0
  24. logxpy-0.1.0/docs/source/introduction.rst +74 -0
  25. logxpy-0.1.0/docs/source/news.rst +415 -0
  26. logxpy-0.1.0/docs/source/outputting/elasticsearch.rst +33 -0
  27. logxpy-0.1.0/docs/source/outputting/index.rst +9 -0
  28. logxpy-0.1.0/docs/source/outputting/journald.rst +78 -0
  29. logxpy-0.1.0/docs/source/outputting/logstash_standalone.conf +31 -0
  30. logxpy-0.1.0/docs/source/outputting/output.rst +87 -0
  31. logxpy-0.1.0/docs/source/python2.rst +6 -0
  32. logxpy-0.1.0/docs/source/quickstart.rst +131 -0
  33. logxpy-0.1.0/docs/source/reading/fields.rst +46 -0
  34. logxpy-0.1.0/docs/source/reading/index.rst +7 -0
  35. logxpy-0.1.0/docs/source/reading/reading.rst +66 -0
  36. logxpy-0.1.0/docs/source/scientific-computing.rst +123 -0
  37. logxpy-0.1.0/examples/01_simple_logging.py +42 -0
  38. logxpy-0.1.0/examples/02_decorators.py +59 -0
  39. logxpy-0.1.0/examples/03_context_scopes.py +47 -0
  40. logxpy-0.1.0/examples/04_async_tasks.py +49 -0
  41. logxpy-0.1.0/examples/05_error_handling.py +47 -0
  42. logxpy-0.1.0/examples/06_data_types.py +56 -0
  43. logxpy-0.1.0/examples/07_generators_iterators.py +46 -0
  44. logxpy-0.1.0/examples/08_tracing_opentelemetry.py +40 -0
  45. logxpy-0.1.0/examples/09_configuration.py +58 -0
  46. logxpy-0.1.0/examples/10_advanced_patterns.py +51 -0
  47. logxpy-0.1.0/examples/11_complex_ecommerce.py +470 -0
  48. logxpy-0.1.0/examples/12_complex_banking.py +558 -0
  49. logxpy-0.1.0/examples/13_complex_data_pipeline.py +608 -0
  50. logxpy-0.1.0/examples/example-output-log/01_output.log +21 -0
  51. logxpy-0.1.0/examples/example-output-log/02_output.log +14 -0
  52. logxpy-0.1.0/examples/example-output-log/03_output.log +15 -0
  53. logxpy-0.1.0/examples/example-output-log/04_output.log +19 -0
  54. logxpy-0.1.0/examples/example-output-log/05_output.log +12 -0
  55. logxpy-0.1.0/examples/example-output-log/06_output.log +12 -0
  56. logxpy-0.1.0/examples/example-output-log/07_output.log +13 -0
  57. logxpy-0.1.0/examples/example-output-log/08_output.log +5 -0
  58. logxpy-0.1.0/examples/example-output-log/09_output.log +10 -0
  59. logxpy-0.1.0/examples/example-output-log/10_output.log +12 -0
  60. logxpy-0.1.0/examples/example-output-log/11_output.log +116 -0
  61. logxpy-0.1.0/examples/example-output-log/12_output.log +168 -0
  62. logxpy-0.1.0/examples/example-output-log/13_output.log +179 -0
  63. logxpy-0.1.0/examples/example-output-log/README.md +379 -0
  64. logxpy-0.1.0/examples/example-output-log/SUMMARY.txt +167 -0
  65. logxpy-0.1.0/examples/legacy/asyncio_linkcheck.py +24 -0
  66. logxpy-0.1.0/examples/legacy/cross_process_client.py +27 -0
  67. logxpy-0.1.0/examples/legacy/cross_process_server.py +32 -0
  68. logxpy-0.1.0/examples/legacy/cross_thread.py +27 -0
  69. logxpy-0.1.0/examples/legacy/dask_eliot.py +45 -0
  70. logxpy-0.1.0/examples/legacy/journald.py +18 -0
  71. logxpy-0.1.0/examples/legacy/linkcheck.py +19 -0
  72. logxpy-0.1.0/examples/legacy/logfile.py +30 -0
  73. logxpy-0.1.0/examples/legacy/rometrip_actions.py +26 -0
  74. logxpy-0.1.0/examples/legacy/stdlib.py +41 -0
  75. logxpy-0.1.0/examples/legacy/stdout.py +19 -0
  76. logxpy-0.1.0/examples/legacy/trio_say.py +17 -0
  77. logxpy-0.1.0/logxpy/__init__.py +126 -0
  78. logxpy-0.1.0/logxpy/_action.py +958 -0
  79. logxpy-0.1.0/logxpy/_async.py +186 -0
  80. logxpy-0.1.0/logxpy/_base.py +80 -0
  81. logxpy-0.1.0/logxpy/_compat.py +71 -0
  82. logxpy-0.1.0/logxpy/_config.py +45 -0
  83. logxpy-0.1.0/logxpy/_dest.py +88 -0
  84. logxpy-0.1.0/logxpy/_errors.py +58 -0
  85. logxpy-0.1.0/logxpy/_fmt.py +68 -0
  86. logxpy-0.1.0/logxpy/_generators.py +136 -0
  87. logxpy-0.1.0/logxpy/_mask.py +23 -0
  88. logxpy-0.1.0/logxpy/_message.py +195 -0
  89. logxpy-0.1.0/logxpy/_output.py +517 -0
  90. logxpy-0.1.0/logxpy/_pool.py +93 -0
  91. logxpy-0.1.0/logxpy/_traceback.py +126 -0
  92. logxpy-0.1.0/logxpy/_types.py +71 -0
  93. logxpy-0.1.0/logxpy/_util.py +56 -0
  94. logxpy-0.1.0/logxpy/_validation.py +486 -0
  95. logxpy-0.1.0/logxpy/_version.py +21 -0
  96. logxpy-0.1.0/logxpy/cli.py +61 -0
  97. logxpy-0.1.0/logxpy/dask.py +172 -0
  98. logxpy-0.1.0/logxpy/decorators.py +268 -0
  99. logxpy-0.1.0/logxpy/filter.py +124 -0
  100. logxpy-0.1.0/logxpy/journald.py +88 -0
  101. logxpy-0.1.0/logxpy/json.py +149 -0
  102. logxpy-0.1.0/logxpy/loggerx.py +253 -0
  103. logxpy-0.1.0/logxpy/logwriter.py +84 -0
  104. logxpy-0.1.0/logxpy/parse.py +191 -0
  105. logxpy-0.1.0/logxpy/prettyprint.py +173 -0
  106. logxpy-0.1.0/logxpy/serializers.py +36 -0
  107. logxpy-0.1.0/logxpy/stdlib.py +23 -0
  108. logxpy-0.1.0/logxpy/tai64n.py +45 -0
  109. logxpy-0.1.0/logxpy/testing.py +472 -0
  110. logxpy-0.1.0/logxpy/tests/__init__.py +9 -0
  111. logxpy-0.1.0/logxpy/tests/common.py +36 -0
  112. logxpy-0.1.0/logxpy/tests/strategies.py +231 -0
  113. logxpy-0.1.0/logxpy/tests/test_action.py +1751 -0
  114. logxpy-0.1.0/logxpy/tests/test_api.py +86 -0
  115. logxpy-0.1.0/logxpy/tests/test_async.py +67 -0
  116. logxpy-0.1.0/logxpy/tests/test_compat.py +13 -0
  117. logxpy-0.1.0/logxpy/tests/test_config.py +21 -0
  118. logxpy-0.1.0/logxpy/tests/test_coroutines.py +105 -0
  119. logxpy-0.1.0/logxpy/tests/test_dask.py +211 -0
  120. logxpy-0.1.0/logxpy/tests/test_decorators.py +54 -0
  121. logxpy-0.1.0/logxpy/tests/test_filter.py +122 -0
  122. logxpy-0.1.0/logxpy/tests/test_fmt.py +42 -0
  123. logxpy-0.1.0/logxpy/tests/test_generators.py +292 -0
  124. logxpy-0.1.0/logxpy/tests/test_journald.py +246 -0
  125. logxpy-0.1.0/logxpy/tests/test_json.py +208 -0
  126. logxpy-0.1.0/logxpy/tests/test_loggerx.py +44 -0
  127. logxpy-0.1.0/logxpy/tests/test_logwriter.py +262 -0
  128. logxpy-0.1.0/logxpy/tests/test_message.py +334 -0
  129. logxpy-0.1.0/logxpy/tests/test_output.py +921 -0
  130. logxpy-0.1.0/logxpy/tests/test_parse.py +309 -0
  131. logxpy-0.1.0/logxpy/tests/test_pool.py +55 -0
  132. logxpy-0.1.0/logxpy/tests/test_prettyprint.py +303 -0
  133. logxpy-0.1.0/logxpy/tests/test_pyinstaller.py +35 -0
  134. logxpy-0.1.0/logxpy/tests/test_serializers.py +36 -0
  135. logxpy-0.1.0/logxpy/tests/test_stdlib.py +73 -0
  136. logxpy-0.1.0/logxpy/tests/test_tai64n.py +66 -0
  137. logxpy-0.1.0/logxpy/tests/test_testing.py +1051 -0
  138. logxpy-0.1.0/logxpy/tests/test_traceback.py +251 -0
  139. logxpy-0.1.0/logxpy/tests/test_twisted.py +814 -0
  140. logxpy-0.1.0/logxpy/tests/test_util.py +45 -0
  141. logxpy-0.1.0/logxpy/tests/test_validation.py +989 -0
  142. logxpy-0.1.0/logxpy/twisted.py +265 -0
  143. logxpy-0.1.0/logxpy.egg-info/PKG-INFO +100 -0
  144. logxpy-0.1.0/logxpy.egg-info/SOURCES.txt +150 -0
  145. logxpy-0.1.0/logxpy.egg-info/dependency_links.txt +1 -0
  146. logxpy-0.1.0/logxpy.egg-info/entry_points.txt +2 -0
  147. logxpy-0.1.0/logxpy.egg-info/requires.txt +24 -0
  148. logxpy-0.1.0/logxpy.egg-info/top_level.txt +1 -0
  149. logxpy-0.1.0/setup.cfg +19 -0
  150. logxpy-0.1.0/setup.py +78 -0
  151. logxpy-0.1.0/versioneer.py +2277 -0
logxpy-0.1.0/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright {yyyy} {name of copyright owner}
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,8 @@
1
+ include LICENSE
2
+ include README.rst
3
+ include versioneer.py
4
+ include logxpy/_version.py
5
+ recursive-include docs *
6
+ prune docs/_build
7
+ recursive-include benchmarks *
8
+ recursive-include examples *
logxpy-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,100 @@
1
+ Metadata-Version: 2.4
2
+ Name: logxpy
3
+ Version: 0.1.0
4
+ Summary: Logging library that tells you why it happened
5
+ Home-page: https://github.com/itamarst/eliot/
6
+ Maintainer: Itamar Turner-Trauring
7
+ Maintainer-email: itamar@itamarst.org
8
+ License: Apache 2.0
9
+ Keywords: logging
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Programming Language :: Python
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.9
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Programming Language :: Python :: 3.13
20
+ Classifier: Programming Language :: Python :: Implementation :: CPython
21
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
22
+ Classifier: Topic :: System :: Logging
23
+ Requires-Python: >=3.9.0
24
+ License-File: LICENSE
25
+ Requires-Dist: zope.interface
26
+ Requires-Dist: pyrsistent>=0.11.8
27
+ Requires-Dist: boltons>=19.0.1
28
+ Requires-Dist: orjson; implementation_name == "cpython"
29
+ Provides-Extra: journald
30
+ Requires-Dist: cffi>=1.1.2; extra == "journald"
31
+ Provides-Extra: test
32
+ Requires-Dist: hypothesis>=1.14.0; extra == "test"
33
+ Requires-Dist: testtools; extra == "test"
34
+ Requires-Dist: pytest; extra == "test"
35
+ Requires-Dist: pytest-xdist; extra == "test"
36
+ Provides-Extra: dev
37
+ Requires-Dist: setuptools>=40; extra == "dev"
38
+ Requires-Dist: twine>=1.12.1; extra == "dev"
39
+ Requires-Dist: coverage; extra == "dev"
40
+ Requires-Dist: sphinx; extra == "dev"
41
+ Requires-Dist: sphinx_rtd_theme; extra == "dev"
42
+ Requires-Dist: flake8; extra == "dev"
43
+ Requires-Dist: black; extra == "dev"
44
+ Dynamic: classifier
45
+ Dynamic: description
46
+ Dynamic: home-page
47
+ Dynamic: keywords
48
+ Dynamic: license
49
+ Dynamic: license-file
50
+ Dynamic: maintainer
51
+ Dynamic: maintainer-email
52
+ Dynamic: provides-extra
53
+ Dynamic: requires-dist
54
+ Dynamic: requires-python
55
+ Dynamic: summary
56
+
57
+ Eliot: Logging that tells you *why* it happened
58
+ ================================================
59
+
60
+ Python's built-in ``logging`` and other similar systems output a stream of factoids: they're interesting, but you can't really tell what's going on.
61
+
62
+ * Why is your application slow?
63
+ * What caused this code path to be chosen?
64
+ * Why did this error happen?
65
+
66
+ Standard logging can't answer these questions.
67
+
68
+ But with a better model you could understand what and why things happened in your application.
69
+ You could pinpoint performance bottlenecks, you could understand what happened when, who called what.
70
+
71
+ That is what Eliot does.
72
+ ``logxpy`` is a Python logging system that outputs causal chains of **actions**: actions can spawn other actions, and eventually they either **succeed or fail**.
73
+ The resulting logs tell you the story of what your software did: what happened, and what caused it.
74
+
75
+ Eliot supports a range of use cases and 3rd party libraries:
76
+
77
+ * Logging within a single process.
78
+ * Causal tracing across a distributed system.
79
+ * Scientific computing, with `built-in support for NumPy and Dask <https://logxpy.readthedocs.io/en/stable/scientific-computing.html>`_.
80
+ * `Asyncio and Trio coroutines <https://logxpy.readthedocs.io/en/stable/generating/asyncio.html>`_ and the `Twisted networking framework <https://logxpy.readthedocs.io/en/stable/generating/twisted.html>`_.
81
+
82
+ Eliot is only used to generate your logs; you will might need tools like Logstash and ElasticSearch to aggregate and store logs if you are using multiple processes across multiple machines.
83
+
84
+ Eliot supports Python 3.9-3.13, as well as PyPy3.
85
+ It is maintained by Itamar Turner-Trauring, and released under the Apache 2.0 License.
86
+
87
+ * `Read the documentation <https://logxpy.readthedocs.io>`_.
88
+ * Download from `PyPI`_ or `conda-forge <https://anaconda.org/conda-forge/logxpy>`_.
89
+ * Need help or have any questions? `File an issue <https://github.com/itamarst/logxpy/issues/new>`_ on GitHub.
90
+ * **Commercial support** is available from `Python⇒Speed <https://pythonspeed.com/services/#logxpy>`_.
91
+
92
+ Testimonials
93
+ ------------
94
+
95
+ "Eliot has made tracking down causes of failure (in complex external integrations and internal uses) tremendously easier. Our errors are logged to Sentry with the Eliot task UUID. That means we can go from a Sentry notification to a high-level trace of operations—with important metadata at each operation—in a few seconds. We immediately know which user did what in which part of the system."
96
+
97
+ —Jonathan Jacobs
98
+
99
+ .. _Github: https://github.com/itamarst/logxpy
100
+ .. _PyPI: https://pypi.python.org/pypi/logxpy
@@ -0,0 +1,44 @@
1
+ Eliot: Logging that tells you *why* it happened
2
+ ================================================
3
+
4
+ Python's built-in ``logging`` and other similar systems output a stream of factoids: they're interesting, but you can't really tell what's going on.
5
+
6
+ * Why is your application slow?
7
+ * What caused this code path to be chosen?
8
+ * Why did this error happen?
9
+
10
+ Standard logging can't answer these questions.
11
+
12
+ But with a better model you could understand what and why things happened in your application.
13
+ You could pinpoint performance bottlenecks, you could understand what happened when, who called what.
14
+
15
+ That is what Eliot does.
16
+ ``logxpy`` is a Python logging system that outputs causal chains of **actions**: actions can spawn other actions, and eventually they either **succeed or fail**.
17
+ The resulting logs tell you the story of what your software did: what happened, and what caused it.
18
+
19
+ Eliot supports a range of use cases and 3rd party libraries:
20
+
21
+ * Logging within a single process.
22
+ * Causal tracing across a distributed system.
23
+ * Scientific computing, with `built-in support for NumPy and Dask <https://logxpy.readthedocs.io/en/stable/scientific-computing.html>`_.
24
+ * `Asyncio and Trio coroutines <https://logxpy.readthedocs.io/en/stable/generating/asyncio.html>`_ and the `Twisted networking framework <https://logxpy.readthedocs.io/en/stable/generating/twisted.html>`_.
25
+
26
+ Eliot is only used to generate your logs; you will might need tools like Logstash and ElasticSearch to aggregate and store logs if you are using multiple processes across multiple machines.
27
+
28
+ Eliot supports Python 3.9-3.13, as well as PyPy3.
29
+ It is maintained by Itamar Turner-Trauring, and released under the Apache 2.0 License.
30
+
31
+ * `Read the documentation <https://logxpy.readthedocs.io>`_.
32
+ * Download from `PyPI`_ or `conda-forge <https://anaconda.org/conda-forge/logxpy>`_.
33
+ * Need help or have any questions? `File an issue <https://github.com/itamarst/logxpy/issues/new>`_ on GitHub.
34
+ * **Commercial support** is available from `Python⇒Speed <https://pythonspeed.com/services/#logxpy>`_.
35
+
36
+ Testimonials
37
+ ------------
38
+
39
+ "Eliot has made tracking down causes of failure (in complex external integrations and internal uses) tremendously easier. Our errors are logged to Sentry with the Eliot task UUID. That means we can go from a Sentry notification to a high-level trace of operations—with important metadata at each operation—in a few seconds. We immediately know which user did what in which part of the system."
40
+
41
+ —Jonathan Jacobs
42
+
43
+ .. _Github: https://github.com/itamarst/logxpy
44
+ .. _PyPI: https://pypi.python.org/pypi/logxpy
@@ -0,0 +1,49 @@
1
+ """
2
+ A benchmark for eliot.logwriter.
3
+ """
4
+
5
+ import tempfile
6
+ import time
7
+
8
+ from twisted.internet.task import react
9
+ from twisted.python.filepath import FilePath
10
+
11
+ from logxpy.logwriter import ThreadedFileWriter
12
+
13
+
14
+ LENGTH = 100
15
+ MESSAGES = 100000
16
+
17
+
18
+ def main(reactor):
19
+ print("Message size: %d bytes Num messages: %d" % (LENGTH, MESSAGES))
20
+ message = b"a" * LENGTH
21
+ fp = FilePath(tempfile.mktemp())
22
+ writer = ThreadedFileWriter(fp.open("ab"), reactor)
23
+ writer.startService()
24
+
25
+ start = time.time()
26
+ for i in range(MESSAGES):
27
+ writer(message)
28
+ d = writer.stopService()
29
+
30
+ def done(_):
31
+ elapsed = time.time() - start
32
+ kbSec = (LENGTH * MESSAGES) / (elapsed * 1024)
33
+ messagesSec = MESSAGES / elapsed
34
+ print("messages/sec: %s KB/sec: %s" % (messagesSec, kbSec))
35
+
36
+ d.addCallback(done)
37
+
38
+ def cleanup(result):
39
+ fp.restat()
40
+ print()
41
+ print("File size: ", fp.getsize())
42
+ fp.remove()
43
+
44
+ d.addBoth(cleanup)
45
+ return d
46
+
47
+
48
+ if __name__ == "__main__":
49
+ react(main, [])
@@ -0,0 +1,41 @@
1
+ """
2
+ Benchmark of message serialization.
3
+
4
+ The goal here is to mostly focus on performance of serialization, in a vaguely
5
+ realistic manner. That is, mesages are logged in context of a message with a
6
+ small number of fields.
7
+ """
8
+
9
+
10
+ import time
11
+
12
+ from logxpy import start_action, to_file
13
+
14
+ # Ensure JSON serialization is part of benchmark:
15
+ to_file(open("/dev/null", "w"))
16
+
17
+ N = 100_000
18
+
19
+
20
+ def run():
21
+ start = time.time()
22
+ for i in range(N):
23
+ with start_action(action_type="my_action"):
24
+ with start_action(action_type="my_action2") as ctx:
25
+ ctx.log(
26
+ message_type="my_message",
27
+ integer=3,
28
+ string="abcdeft",
29
+ string2="dgsjdlkgjdsl",
30
+ list=[1, 2, 3, 4],
31
+ )
32
+ end = time.time()
33
+
34
+ # Each iteration has 5 messages: start/end of my_action, start/end of
35
+ # my_action2, and my_message.
36
+ print("%.6f per message" % ((end - start) / (N * 5),))
37
+ print("%s messages/sec" % (int(N / (end - start)),))
38
+
39
+
40
+ if __name__ == "__main__":
41
+ run()
@@ -0,0 +1,41 @@
1
+ """
2
+ Benchmark of message serialization.
3
+
4
+ The goal here is to mostly focus on performance of serialization, in a vaguely
5
+ realistic manner. That is, mesages are logged in context of a message with a
6
+ small number of fields.
7
+ """
8
+
9
+ import time
10
+ import polars as pl
11
+ from logxpy import start_action, to_file
12
+
13
+ # Ensure JSON serialization is part of benchmark:
14
+ to_file(open("/dev/null", "w"))
15
+
16
+ N = 100_000
17
+
18
+ MY_SET = {1, 2, 3, 4}
19
+ SERIES = pl.Series([1, 2, 3])
20
+
21
+
22
+ def run():
23
+ start = time.time()
24
+ for i in range(N):
25
+ with start_action(action_type="my_action"):
26
+ with start_action(action_type="my_action2") as ctx:
27
+ ctx.log(
28
+ message_type="my_message",
29
+ series=SERIES,
30
+ my_set=MY_SET,
31
+ )
32
+ end = time.time()
33
+
34
+ # Each iteration has 5 messages: start/end of my_action, start/end of
35
+ # my_action2, and my_message.
36
+ print("%.6f per message" % ((end - start) / (N * 5),))
37
+ print("%s messages/sec" % (int(N / (end - start)),))
38
+
39
+
40
+ if __name__ == "__main__":
41
+ run()
@@ -0,0 +1,177 @@
1
+ # Makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line.
5
+ SPHINXOPTS =
6
+ SPHINXBUILD = sphinx-build
7
+ PAPER =
8
+ BUILDDIR = build
9
+
10
+ # User-friendly check for sphinx-build
11
+ ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
12
+ $(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
13
+ endif
14
+
15
+ # Internal variables.
16
+ PAPEROPT_a4 = -D latex_paper_size=a4
17
+ PAPEROPT_letter = -D latex_paper_size=letter
18
+ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
19
+ # the i18n builder cannot share the environment and doctrees with the others
20
+ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
21
+
22
+ .PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
23
+
24
+ help:
25
+ @echo "Please use \`make <target>' where <target> is one of"
26
+ @echo " html to make standalone HTML files"
27
+ @echo " dirhtml to make HTML files named index.html in directories"
28
+ @echo " singlehtml to make a single large HTML file"
29
+ @echo " pickle to make pickle files"
30
+ @echo " json to make JSON files"
31
+ @echo " htmlhelp to make HTML files and a HTML help project"
32
+ @echo " qthelp to make HTML files and a qthelp project"
33
+ @echo " devhelp to make HTML files and a Devhelp project"
34
+ @echo " epub to make an epub"
35
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
36
+ @echo " latexpdf to make LaTeX files and run them through pdflatex"
37
+ @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
38
+ @echo " text to make text files"
39
+ @echo " man to make manual pages"
40
+ @echo " texinfo to make Texinfo files"
41
+ @echo " info to make Texinfo files and run them through makeinfo"
42
+ @echo " gettext to make PO message catalogs"
43
+ @echo " changes to make an overview of all changed/added/deprecated items"
44
+ @echo " xml to make Docutils-native XML files"
45
+ @echo " pseudoxml to make pseudoxml-XML files for display purposes"
46
+ @echo " linkcheck to check all external links for integrity"
47
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
48
+
49
+ clean:
50
+ rm -rf $(BUILDDIR)/*
51
+
52
+ html:
53
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
54
+ @echo
55
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
56
+
57
+ dirhtml:
58
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
59
+ @echo
60
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
61
+
62
+ singlehtml:
63
+ $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
64
+ @echo
65
+ @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
66
+
67
+ pickle:
68
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
69
+ @echo
70
+ @echo "Build finished; now you can process the pickle files."
71
+
72
+ json:
73
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
74
+ @echo
75
+ @echo "Build finished; now you can process the JSON files."
76
+
77
+ htmlhelp:
78
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
79
+ @echo
80
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
81
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
82
+
83
+ qthelp:
84
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
85
+ @echo
86
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
87
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
88
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/Eliot.qhcp"
89
+ @echo "To view the help file:"
90
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/Eliot.qhc"
91
+
92
+ devhelp:
93
+ $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
94
+ @echo
95
+ @echo "Build finished."
96
+ @echo "To view the help file:"
97
+ @echo "# mkdir -p $$HOME/.local/share/devhelp/Eliot"
98
+ @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/Eliot"
99
+ @echo "# devhelp"
100
+
101
+ epub:
102
+ $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
103
+ @echo
104
+ @echo "Build finished. The epub file is in $(BUILDDIR)/epub."
105
+
106
+ latex:
107
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
108
+ @echo
109
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
110
+ @echo "Run \`make' in that directory to run these through (pdf)latex" \
111
+ "(use \`make latexpdf' here to do that automatically)."
112
+
113
+ latexpdf:
114
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
115
+ @echo "Running LaTeX files through pdflatex..."
116
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf
117
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
118
+
119
+ latexpdfja:
120
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
121
+ @echo "Running LaTeX files through platex and dvipdfmx..."
122
+ $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
123
+ @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
124
+
125
+ text:
126
+ $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
127
+ @echo
128
+ @echo "Build finished. The text files are in $(BUILDDIR)/text."
129
+
130
+ man:
131
+ $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
132
+ @echo
133
+ @echo "Build finished. The manual pages are in $(BUILDDIR)/man."
134
+
135
+ texinfo:
136
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
137
+ @echo
138
+ @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
139
+ @echo "Run \`make' in that directory to run these through makeinfo" \
140
+ "(use \`make info' here to do that automatically)."
141
+
142
+ info:
143
+ $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
144
+ @echo "Running Texinfo files through makeinfo..."
145
+ make -C $(BUILDDIR)/texinfo info
146
+ @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
147
+
148
+ gettext:
149
+ $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
150
+ @echo
151
+ @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
152
+
153
+ changes:
154
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
155
+ @echo
156
+ @echo "The overview file is in $(BUILDDIR)/changes."
157
+
158
+ linkcheck:
159
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
160
+ @echo
161
+ @echo "Link check complete; look for any errors in the above output " \
162
+ "or in $(BUILDDIR)/linkcheck/output.txt."
163
+
164
+ doctest:
165
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
166
+ @echo "Testing of doctests in the sources finished, look at the " \
167
+ "results in $(BUILDDIR)/doctest/output.txt."
168
+
169
+ xml:
170
+ $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
171
+ @echo
172
+ @echo "Build finished. The XML files are in $(BUILDDIR)/xml."
173
+
174
+ pseudoxml:
175
+ $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
176
+ @echo
177
+ @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."