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

7 statements  

« prev     ^ index     » next       coverage.py v7.3.2, created at 2023-11-09 09:07 +0000

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

2""" 

3 hexonet.apiconnector.customlogger 

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

5 This module provides all necessary functionality for 

6 debug outputs 

7 :copyright: © 2020 by HEXONET GmbH. 

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

9""" 

10 

11from hexonet.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 # 

31 # implement your own logic here 

32 # 

33 # print(r.getCommandPlain()) 

34 # print(post) 

35 # if error: 

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

37 # print(r.getPlain())