You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> ⚠ This document _only_ reflects the responsible developers at HEXONET GmbH. For a list of MUCH-APPRECIATED CONTRIBUTORS -- people who helped developing and extending this library, applying patches, adding helpful comments
2
2
and thus generally made it that much better, see [GitHub's list of contributors](https://github.com/hexonet/python-sdk/contributors).
3
3
4
-
*[Anthony Schneider](//github.com/anthonyschn) - Original Implementation
5
-
*[Kai Schwarz](//github.com/papakai) - Full Review
4
+
*[Kai Schwarz](//github.com/papakai) - Development Lead
Copy file name to clipboardExpand all lines: README.md
+24Lines changed: 24 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ This module is a connector library for the insanely fast HEXONET Backend API. Fo
23
23
* Automatic IDN Domain name conversion to punycode (our API accepts only punycode format in commands)
24
24
* Allows nested associative arrays in API commands to improve for bulk parameters
25
25
* Connecting and communication with our API
26
+
* Possibility to use a custom mechanism for debug mode
26
27
* Several ways to access and deal with response data
27
28
* Getting the command again returned together with the response
28
29
* Sessionless communication
@@ -91,6 +92,29 @@ e.g. `$cl->setURL("http://127.0.0.1:8765/api/call.cgi");` would change the port.
91
92
92
93
Don't use `https` for that setup as it leads to slowing things down as of the https `overhead` of securing the connection. In this setup we just connect to localhost, so no direct outgoing network traffic using `http`. The apache configuration finally takes care passing it to `https` for the final communication to the HEXONET API.
93
94
95
+
### Customize Logging / Outputs
96
+
97
+
When having the debug mode activated hexonet.apiconnector.logger will be used for doing outputs by default.
98
+
Of course it could be of interest for integrators to look for a way of getting this replaced by a custom mechanism like forwarding things to a 3rd-party software, logging into file or whatever.
99
+
100
+
```python
101
+
from hexonet.apiconnector.apiclient import APIClient asAC
102
+
# import your module from your custom namespace of course
103
+
from hexonet.apiconnector.customlogger import CustomLogger asCL
104
+
105
+
cl = AC()
106
+
# LIVE System would be used otherwise by default
107
+
cl.useOTESystem()
108
+
# enable debug output (inactive by default)
109
+
cl.enableDebugMode()
110
+
# provide your custom logger mechanism
111
+
cl.setCustomLogger(CL())
112
+
cl.setCredentials("test.user", "test.passw0rd")
113
+
r = cl.request({"COMMAND" =>"StatusAccount"})
114
+
```
115
+
116
+
NOTE: Find an example for a custom logger class implementation in `hexonet/apiconnector/customlogger.py`. If you have questions, feel free to open a github issue.
117
+
94
118
## How to use this module in your project
95
119
96
120
All you need to know, can be found [here](https://hexonet-python-sdk.readthedocs.io/en/latest/#usage-guide).
0 commit comments