MCPcopy Index your code
hub / github.com/RustPython/RustPython / process

Method process

Lib/logging/__init__.py:1890–1904  ·  view source on GitHub ↗

Process the logging message and keyword arguments passed in to a logging call to insert contextual information. You can either manipulate the message itself, the keyword args or both. Return the message and kwargs modified (or not) to suit your needs. Normal

(self, msg, kwargs)

Source from the content-addressed store, hash-verified

1888 self.merge_extra = merge_extra
1889
1890 def process(self, msg, kwargs):
1891 """
1892 Process the logging message and keyword arguments passed in to
1893 a logging call to insert contextual information. You can either
1894 manipulate the message itself, the keyword args or both. Return
1895 the message and kwargs modified (or not) to suit your needs.
1896
1897 Normally, you'll only need to override this one method in a
1898 LoggerAdapter subclass for your specific needs.
1899 """
1900 if self.merge_extra and "extra" in kwargs:
1901 kwargs["extra"] = {**self.extra, **kwargs["extra"]}
1902 else:
1903 kwargs["extra"] = self.extra
1904 return msg, kwargs
1905
1906 #
1907 # Boilerplate convenience methods

Callers 1

logMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected