Coverage for centralnicreseller / apiconnector / logger.py: 100%

8 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-03-26 16:22 +0000

1# -*- coding: utf-8 -*- 

2""" 

3 centralnicreseller.apiconnector.logger 

4 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 

5 This module provides all necessary functionality for 

6 debug outputs see the customlogger class on how to override this 

7 :copyright: © 2024 Team Internet Group PLC. 

8 :license: MIT, see LICENSE for more details. 

9""" 

10 

11import sys 

12 

13 

14class Logger(object): 

15 """ 

16 The Logger class covers all you need to cover debug outputs of the API communication. 

17 """ 

18 

19 def log(self, post, r, error): 

20 """ 

21 output/log given data 

22 """ 

23 print(r.getCommandPlain()) 

24 print(post) 

25 if error: 

26 print("HTTP communication failed: %s" % (error), sys.stderr) 

27 print(r.getPlain())