MCPcopy
hub / github.com/certbot/certbot / format

Method format

certbot/src/certbot/_internal/log.py:197–209  ·  view source on GitHub ↗

Formats the string representation of record. :param logging.LogRecord record: Record to be formatted :returns: Formatted, string representation of record :rtype: str

(self, record: logging.LogRecord)

Source from the content-addressed store, hash-verified

195 self.red_level = logging.WARNING
196
197 def format(self, record: logging.LogRecord) -> str:
198 """Formats the string representation of record.
199
200 :param logging.LogRecord record: Record to be formatted
201
202 :returns: Formatted, string representation of record
203 :rtype: str
204
205 """
206 out = super().format(record)
207 if self.colored and record.levelno >= self.red_level:
208 return ''.join((util.ANSI_SGR_RED, out, util.ANSI_SGR_RESET))
209 return out
210
211
212class MemoryHandler(logging.handlers.MemoryHandler):

Callers 15

mainFunction · 0.80
find_python_executableFunction · 0.80
_check_versionFunction · 0.80
subprocess_with_printFunction · 0.80
get_venv_python_pathFunction · 0.80
prepare_venv_pathFunction · 0.80
install_packagesFunction · 0.80
get_messageFunction · 0.80
mainFunction · 0.80
add_parser_argumentsMethod · 0.80
_setup_credentialsMethod · 0.80

Calls

no outgoing calls

Tested by 15

mainFunction · 0.64
pytest_generate_testsFunction · 0.64
install_certbot_snapFunction · 0.64
test_dns_plugin_installFunction · 0.64
_setup_primary_nodeFunction · 0.64
test_reuse_keyFunction · 0.64
test_default_key_typeFunction · 0.64