44import re
55from distutils .version import LooseVersion
66import mamonsu .lib .platform as platform
7- import logging
87
98
109class MemoryLeakDiagnostic (Plugin ):
@@ -24,7 +23,7 @@ def __init__(self, config):
2423 super (Plugin , self ).__init__ (config )
2524 if not platform .LINUX :
2625 self .disable ()
27- logging .error ('Plugin {name} work only on Linux. ' .format (name = self .__class__ .__name__ ))
26+ self . log .error ('Plugin {name} work only on Linux. ' .format (name = self .__class__ .__name__ ))
2827
2928 if self .is_enabled ():
3029 self .page_size = os .sysconf ('SC_PAGE_SIZE' )
@@ -42,9 +41,9 @@ def __init__(self, config):
4241 ratio = 1024 * 1024 * 1024 * 1024
4342 else :
4443 self .disable ()
45- logging .error ('Error in config, section [{section}], parameter private_anon_mem_threshold. '
46- 'Possible values MB, GB, TB. For example 1GB.'
47- .format (section = self .__class__ .__name__ .lower ()))
44+ self . log .error ('Error in config, section [{section}], parameter private_anon_mem_threshold. '
45+ 'Possible values MB, GB, TB. For example 1GB.'
46+ .format (section = self .__class__ .__name__ .lower ()))
4847
4948 self .diff = ratio * int (private_anon_mem_threshold )
5049
@@ -53,7 +52,7 @@ def __init__(self, config):
5352 try :
5453 release_file = open (os_release_file , 'r' ).readlines ()
5554 except Exception as e :
56- logging .info (f'Cannot read file { os_release_file } : { e } ' )
55+ self . log .info (f'Cannot read file { os_release_file } : { e } ' )
5756 release_file = None
5857
5958 if release_file :
0 commit comments