]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Add note about `parse_*` function in options.py 3082/head
authorPython-37 <19404655+Python-37@users.noreply.github.com>
Wed, 1 Dec 2021 02:38:45 +0000 (10:38 +0800)
committerGitHub <noreply@github.com>
Wed, 1 Dec 2021 02:38:45 +0000 (10:38 +0800)
tornado/options.py

index 993e673e70b4f19718a50f83321372a9421b5749..78c7fd8331bf6b923f3ef831f1ed0ea0956367e7 100644 (file)
@@ -86,6 +86,12 @@ instances to define isolated sets of options, such as for subcommands.
        options.logging = None
        parse_command_line()
 
+.. note::
+
+   `parse_command_line` or `parse_config_file` function should called after
+   logging configuration and user-defined command line flags using the
+   `callback` option definition, or these configurations will not take effect.
+
 .. versionchanged:: 4.3
    Dashes and underscores are fully interchangeable in option names;
    options can be defined, set, and read with any mix of the two.
@@ -322,10 +328,6 @@ class OptionParser(object):
 
         Note that ``args[0]`` is ignored since it is the program name
         in `sys.argv`.
-        
-        Note that ``logging-related`` flags (such as ``log_to_stderr``,
-        ``log_file_prefix``) to options will not take effect if they
-        are setted after this line.
 
         We return a list of all arguments that are not parsed as options.