[cherry-pick 2.0 beta][Dy2Stat-debugging] Fix bug: Returns True if the verbosity level set by the user is greater than or equal to the log level !27052
Created by: liym27
PR types
Bug fixes
PR changes
Others
Describe
cherry pick https://github.com/PaddlePaddle/Paddle/pull/26858