set_verbosity

paddle.jit. set_verbosity ( level=0, also_to_stdout=False ) [source]

Sets the verbosity level of log for dygraph to static graph. Logs can be output to stdout by setting also_to_stdout.

There are two means to set the logging verbosity:

  1. Call function set_verbosity

  2. Set environment variable TRANSLATOR_VERBOSITY

Note: set_verbosity has a higher priority than the environment variable.

Parameters
  • level (int) – The verbosity level. The larger value indicates more verbosity. The default value is 0, which means no logging.

  • also_to_stdout (bool) – Whether to also output log messages to sys.stdout.

Examples

>>> import os
>>> import paddle

>>> paddle.jit.set_verbosity(1)
>>> # The verbosity level is now 1

>>> os.environ['TRANSLATOR_VERBOSITY'] = '3'
>>> # The verbosity level is now 3, but it has no effect because it has a lower priority than `set_verbosity`

Used in the guide/tutorials