softspring / gcloud-integration-bundle

此包已被弃用,不再维护。未建议替代包。

此套餐允许将 Symfony 项目与 Gcloud 集成

安装数: 2,579

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 0

开放问题: 0

类型:symfony-bundle

v0.1.7 2018-10-21 08:31 UTC

This package is auto-updated.

Last update: 2019-09-11 11:17:25 UTC


README

此套餐允许将 Symfony 项目与 Google Cloud Platform 集成。

警告!!此套餐正在开发中。请谨慎使用。

错误报告

sfs_gcloud_integration:
    error_reporting: true

if ($env == 'prod') {
    Bootstrap::init();
}

参考

https://cloud.google.com/error-reporting/docs/setup/php

日志记录

基本配置

sfs_gcloud_integration:
    logging: ~
    
monolog:
    handlers:
        custom:
            type: service
            id: sfs_gcloud_integration.monolog.handler

配置参考

# Default configuration for "SfsGcloudIntegrationBundle"
sfs_gcloud_integration:
    logging:
        enabled:  false
        level:    debug
        bubble:   true
        logger:
            # The name of the log to write entries to.
            name:       global
            # The monitored resource to associate log entries with. https://cloud.google.com/logging/docs/api/reference/rest/v2/MonitoredResource
            resource:   []
            # A set of user-defined (key, value) data that provides additional information about the log entry.
            labels:     []

参考

https://github.com/googlecloudplatform/google-cloud-php#google-stackdriver-logging-ga
https://googlecloudplatform.github.io/google-cloud-php/#/docs/cloud-logging/v1.8.3/logging/loggingclient
http://googlecloudplatform.github.io/google-cloud-php/#/docs/google-cloud/v0.51.0/logging/loggingclient