fix: avoid duplicating log in stderr.

This was introduced to work around google-auth kills all logs via `google` root logging namespace. Given we're now using `google_adk` as root logging namesapce, we don't need additional Stream log handler now.

PiperOrigin-RevId: 763924531
This commit is contained in:
Wei Sun (Jack) 2025-05-27 13:27:19 -07:00 committed by Copybara-Service
parent 03fe909ada
commit 16d9696012

View File

@ -12,9 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from __future__ import annotations
import logging
import os
import sys
import tempfile
import time
@ -27,14 +28,8 @@ def setup_adk_logger(level=logging.INFO):
# Configure the root logger format and level.
logging.basicConfig(level=level, format=LOGGING_FORMAT)
# Set up adk_logger and log to stderr.
handler = logging.StreamHandler(sys.stderr)
handler.setLevel(level)
handler.setFormatter(logging.Formatter(LOGGING_FORMAT))
adk_logger = logging.getLogger('google_adk')
adk_logger.setLevel(level)
adk_logger.addHandler(handler)
def log_to_tmp_folder(