Coverage for centralnicreseller / apiconnector / customlogger.py: 0%

7 statements  

« prev     ^ index     » next       coverage.py v7.13.5, created at 2026-04-21 15:25 +0000

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

2""" 

3 centralnicreseller.apiconnector.customlogger 

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

5 This module provides all necessary functionality for 

6 debug outputs 

7 :copyright: © 2024 Team Internet Group PLC. 

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

9""" 

10 

11from centralnicreseller.apiconnector.logger import Logger 

12import sys 

13 

14 

15class CustomLogger(Logger, object): 

16 """ 

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

18 """ 

19 

20 def __init__(self): 

21 """ 

22 constructor calling parent constructor 

23 """ 

24 super(CustomLogger, self).__init__() 

25 

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

27 """ 

28 output/log given data 

29 """ 

30 super().log(post, r, error) # Call the parent log method 

31 

32 # Implement your own logic here 

33 # For example, you can uncomment the following lines to print additional information 

34 # print(r.getCommandPlain()) 

35 # print(post) 

36 # if error: 

37 # print("HTTP communication failed: %s" % (error), file=sys.stderr) 

38 # print(r.getPlain())