()
return _get_library_root_logger().getEffectiveLevel()
Return the current level for the Optuna's root logger.

    Example:

        Get the default verbosity level.

        .. testsetup::

            def objective(trial):
                x = trial.suggest_float("x", -100, 100)
                y = trial.suggest_categorical("y", [-1, 0, 1])
                return x ** 2 + y

        .. testcode::

            import optuna

            # The default verbosity level of Optuna is `optuna.logging.INFO`.
            print(optuna.logging.get_verbosity())
            # 20
            print(optuna.logging.INFO)
            # 20

            # There are logs of the INFO level.
            study = optuna.create_study()
            study.optimize(objective, n_trials=5)
            # [I 2021-10-31 05:35:17,232] A new study created ...
            # [I 2021-10-31 05:35:17,238] Trial 0 finished with value: ...
            # [I 2021-10-31 05:35:17,245] Trial 1 finished with value: ...
            # ...

        .. testoutput::
           :hide:

           20
           20
    Returns:
        Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``.

    .. note::
        Optuna has following logging levels:

        - ``optuna.logging.CRITICAL``, ``optuna.logging.FATAL``
        - ``optuna.logging.ERROR``
        - ``optuna.logging.WARNING``, ``optuna.logging.WARN``
        - ``optuna.logging.INFO``
        - ``optuna.logging.DEBUG``
Return the current level for the Optuna's root logger.
Return the current level for the Optuna s root logger .
def get_verbosity() -> int:
    """Return the current level for the Optuna's root logger.

    Example:

        Get the default verbosity level.

        .. testsetup::

            def objective(trial):
                x = trial.suggest_float("x", -100, 100)
                y = trial.suggest_categorical("y", [-1, 0, 1])
                return x ** 2 + y

        .. testcode::

            import optuna

            # The default verbosity level of Optuna is `optuna.logging.INFO`.
            print(optuna.logging.get_verbosity())
            # 20
            print(optuna.logging.INFO)
            # 20

            # There are logs of the INFO level.
            study = optuna.create_study()
            study.optimize(objective, n_trials=5)
            # [I 2021-10-31 05:35:17,232] A new study created ...
            # [I 2021-10-31 05:35:17,238] Trial 0 finished with value: ...
            # [I 2021-10-31 05:35:17,245] Trial 1 finished with value: ...
            # ...

        .. testoutput::
           :hide:

           20
           20
    Returns:
        Logging level, e.g., ``optuna.logging.DEBUG`` and ``optuna.logging.INFO``.

    .. note::
        Optuna has following logging levels:

        - ``optuna.logging.CRITICAL``, ``optuna.logging.FATAL``
        - ``optuna.logging.ERROR``
        - ``optuna.logging.WARNING``, ``optuna.logging.WARN``
        - ``optuna.logging.INFO``
        - ``optuna.logging.DEBUG``
    """

    _configure_library_root_logger()
    return _get_library_root_logger().getEffectiveLevel()
def get_verbosity ( ) -> int : _configure_library_root_logger ( ) return _get_library_root_logger ( ) . getEffectiveLevel ( )