.oO SearXNG Developer Documentation Oo.
Loading...
Searching...
No Matches
searx.metrics.error_recorder.ErrorContext Class Reference

Public Member Functions

 __init__ (self, filename, function, line_no, code, exception_classname, log_message, log_parameters, secondary)
 
bool __eq__ (self, o)
 
 __hash__ (self)
 
 __repr__ (self)
 

Public Attributes

 filename = filename
 
 function = function
 
 line_no = line_no
 
 code = code
 
 exception_classname = exception_classname
 
 log_message = log_message
 
 log_parameters = log_parameters
 
 secondary = secondary
 

Static Private Attributes

tuple __slots__
 

Detailed Description

Definition at line 22 of file error_recorder.py.

Constructor & Destructor Documentation

◆ __init__()

searx.metrics.error_recorder.ErrorContext.__init__ ( self,
filename,
function,
line_no,
code,
exception_classname,
log_message,
log_parameters,
secondary )

Definition at line 35 of file error_recorder.py.

37 ):
38 self.filename = filename
39 self.function = function
40 self.line_no = line_no
41 self.code = code
42 self.exception_classname = exception_classname
43 self.log_message = log_message
44 self.log_parameters = log_parameters
45 self.secondary = secondary
46

Member Function Documentation

◆ __eq__()

bool searx.metrics.error_recorder.ErrorContext.__eq__ ( self,
o )

Definition at line 47 of file error_recorder.py.

47 def __eq__(self, o) -> bool: # pylint: disable=invalid-name
48 if not isinstance(o, ErrorContext):
49 return False
50 return (
51 self.filename == o.filename
52 and self.function == o.function
53 and self.line_no == o.line_no
54 and self.code == o.code
55 and self.exception_classname == o.exception_classname
56 and self.log_message == o.log_message
57 and self.log_parameters == o.log_parameters
58 and self.secondary == o.secondary
59 )
60

References searx.metrics.error_recorder.ErrorContext.code, searx.metrics.error_recorder.ErrorContext.exception_classname, searx.exceptions.SearxSettingsException.filename, searx.metrics.error_recorder.ErrorContext.filename, searx.metrics.error_recorder.ErrorContext.function, searx.metrics.error_recorder.ErrorContext.line_no, searx.metrics.error_recorder.ErrorContext.log_message, searx.metrics.error_recorder.ErrorContext.log_parameters, and searx.metrics.error_recorder.ErrorContext.secondary.

◆ __hash__()

searx.metrics.error_recorder.ErrorContext.__hash__ ( self)

◆ __repr__()

searx.metrics.error_recorder.ErrorContext.__repr__ ( self)

Definition at line 75 of file error_recorder.py.

75 def __repr__(self):
76 return "ErrorContext({!r}, {!r}, {!r}, {!r}, {!r}, {!r}) {!r}".format(
77 self.filename,
78 self.line_no,
79 self.code,
80 self.exception_classname,
81 self.log_message,
82 self.log_parameters,
83 self.secondary,
84 )
85
86

References searx.metrics.error_recorder.ErrorContext.code, searx.metrics.error_recorder.ErrorContext.exception_classname, searx.exceptions.SearxSettingsException.filename, searx.metrics.error_recorder.ErrorContext.filename, searx.format, searx.metrics.error_recorder.ErrorContext.line_no, searx.metrics.error_recorder.ErrorContext.log_message, searx.metrics.error_recorder.ErrorContext.log_parameters, and searx.metrics.error_recorder.ErrorContext.secondary.

Member Data Documentation

◆ __slots__

tuple searx.metrics.error_recorder.ErrorContext.__slots__
staticprivate
Initial value:
= (
'filename',
'function',
'line_no',
'code',
'exception_classname',
'log_message',
'log_parameters',
'secondary',
)

Definition at line 24 of file error_recorder.py.

◆ code

◆ exception_classname

searx.metrics.error_recorder.ErrorContext.exception_classname = exception_classname

◆ filename

searx.metrics.error_recorder.ErrorContext.filename = filename

◆ function

searx.metrics.error_recorder.ErrorContext.function = function

◆ line_no

◆ log_message

searx.metrics.error_recorder.ErrorContext.log_message = log_message

◆ log_parameters

searx.metrics.error_recorder.ErrorContext.log_parameters = log_parameters

◆ secondary

searx.metrics.error_recorder.ErrorContext.secondary = secondary

The documentation for this class was generated from the following file: