mirror of
https://github.com/EvolutionAPI/adk-python.git
synced 2025-07-16 04:02:55 -06:00
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:
parent
03fe909ada
commit
16d9696012
@ -12,9 +12,10 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import sys
|
|
||||||
import tempfile
|
import tempfile
|
||||||
import time
|
import time
|
||||||
|
|
||||||
@ -27,14 +28,8 @@ def setup_adk_logger(level=logging.INFO):
|
|||||||
# Configure the root logger format and level.
|
# Configure the root logger format and level.
|
||||||
logging.basicConfig(level=level, format=LOGGING_FORMAT)
|
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 = logging.getLogger('google_adk')
|
||||||
adk_logger.setLevel(level)
|
adk_logger.setLevel(level)
|
||||||
adk_logger.addHandler(handler)
|
|
||||||
|
|
||||||
|
|
||||||
def log_to_tmp_folder(
|
def log_to_tmp_folder(
|
||||||
|
Loading…
Reference in New Issue
Block a user