Lambda (Python logging) не может войти в облачные часы с помощью сторожевой башни - PullRequest
0 голосов
/ 09 января 2020

my logging.yml

# Default AWS Config
  version: 1
  formatters:
  json:
    format: "[%(asctime)s] %(process)d %(levelname)s %(name)s:%(funcName)s:%(lineno)s - %(message)s"
  plaintext:
    format: "[%(asctime)s] %(process)d %(levelname)s %(name)s:%(funcName)s:%(lineno)s - %(message)s"

handlers:
    console:
        (): logging.StreamHandler
        level: DEBUG
        formatter: plaintext
        stream: sys.stdout
    watchtower:
        formatter: json
        level: DEBUG
        (): watchtower.CloudWatchLogHandler
        log_group: logger
        stream_name:  loggable
        boto3_profile_name: default
        send_interval: 1
        create_log_group: False
    loggers:
        root:
            handlers: [console, watchtower]
        boto:
            handlers: [console]
        boto3:
            handlers: [console]
        botocore:
            handlers: [console]
        requests:
            handlers: [console]

setup.py

if __name__ == '__main__':
with open('logging.yml', 'r') as log_config:
    config_yml = log_config.read()
    config_dict = yaml.load(config_yml)
    logging.config.dictConfig(config_dict)
    app.run()

все отлично работает на моем локальном компьютере, все журналы отображаются в моей консоли, но не в облаке ( У меня есть доступ к записи ) перепробовал всю официальную документацию, но пока нет решения.

...