- Learning Cmfive
- Creating A Config
- Install And Migrations
- The Models Folder
- Creating Index Action
- Creating Index Template
- Creating Item Action
- Add Item Table
- Edit Item Button
- Additional Configuration
Cmfive supports two different types of log targets to best suit your needs.
- The AWS Target provides a more reliable solution with the option to specify a retention period (in days).
- The File Target is enabled by default and requires no further setup.
- Add the following entries into the config.php file in the root directory of your Cmfive project.
Config::set("admin.logging", [ "target" => "aws", "retention_period" => RETENTION_PERIOD, "cloudwatch" => [ "group_name" => "GROUP_NAME", "stream_name_app" => "APP_NAME", "region" => "CLOUDWATCH_REGION", "version" => "latest", ] ]);
- If you’re developing on Cmfive locally, also add the following. Note, when system.environment is set to production must be used to authenticate with AWS as this is best practice for security.
Config::set("admin.logging.cloudwatch.credentials", [ "key" => "IAM_KEY", "secret" => "IAM_SECRET", ]); Config::set("system.environment", "development");
- Replace RETENTION_PERIOD, GROUP_NAME, APP_NAME, CLOUDWATCH_REGION with their respective values as well as IAM_KEY and IAM_SECRET if system.environment is set to development.
- Make sure to clear your config cache to apply your changes.