@staticmethod<EOL><INDENT>def warn(code, message, **kwargs):<DEDENT>
if code in Logger._ignored_codes:<EOL><INDENT>return<EOL><DEDENT>assert code in Logger._warning_code_to_exception<EOL>exc_type, domain = Logger._warning_code_to_exception[code]<EOL>if domain in Logger._ignored_domains:<EOL><INDENT>return<EOL><DEDENT>level = WARNING<EOL>if Logger.fatal_warnings:<EOL><INDENT>level = ERROR<EOL><DEDENT>exc = exc_type(message, **kwargs)<EOL>Logger._log(code, exc.message, level, domain)<EOL>if Logger.fatal_warnings:<EOL><INDENT>raise exc<EOL><DEDENT>
Call this to store a warning in the journal.

Will raise if `Logger.fatal_warnings` is set to True.