Skip to content

Latest commit

 

History

History
24 lines (19 loc) · 523 Bytes

5-Log-EN.md

File metadata and controls

24 lines (19 loc) · 523 Bytes

Log

Logger configuration

from aliyunsdkcore.client import AcsClient
from aliyunsdkecs.request.v20140526.AcceptInquiredSystemEventRequest import AcceptInquiredSystemEventRequest

import sys

client = AcsClient(
    '<access_key_id>', 
    '<access_secret>',
    '<region_id>"'
)
client.set_stream_logger(
    stream=sys.stderr, # output stream
    format_string='%(thread)d %(asctime)s %(name)s %(levelname)s %(message)s' # log format
)

client.set_file_logger(
    path='<file_path>' # log file path
)