App Settings
App settings are configuration parameters specific to a particular App within a Convox rack. They provide a flexible way to customize the behavior and functionality of an app without affecting the overall rack configuration. This is especially useful for adapting apps to different environments like development, staging, and production.
appSettings:
awsLogs:
cwRetention: 30
disableRetention: false
Currently, the appSettings section supports the awsLogs parameter.
AWS Logs
The awsLogs section allows you to configure the retention time and policy for the AWS CloudWatch log group associated with your app.
| Attribute | Type | Default | Description |
|---|---|---|---|
| cwRetention | int | unset | How many days CloudWatch keeps this App's log group. Unset means the App expresses no preference. |
| disableRetention | boolean | false |
true removes the retention policy, so this App's log group never expires. |
Important Notes:
cwRetentionmust be one of the periods CloudWatch accepts: 1, 3, 5, 7, 14, 30, 60, 90, 120, 150, 180, 365, 400, 545, 731, 1096, 1827, 2192, 2557, 2922, 3288, 3653. Any other number is rounded up to the next one on the list, so31becomes60. A value above 3653 becomes 3653.- To completely disable retention and retain logs indefinitely, set the
disableRetentionparameter totrue. - An
awsLogsblock that sets neither acwRetentionof 1 or more nordisableRetention: trueexpresses no preference. From Rack version3.25.7, the App's log group then follows cloudwatch_retention_in_days, or keeps the retention it already has when that parameter is unset. A log group Convox creates starts at 7 days. - On Rack version
3.25.6and earlier the same block set the App's log group to 1 day, shorter than the 7 days an App with noawsLogsblock at all keeps. convox.ymlparsing ignores keys it does not recognize, so a misspelled key underawsLogsis dropped without an error and the block is read as setting nothing. From Rack version3.25.7the App's log group then follows the Rack parameter; on3.25.6and earlier it fell to 1 day.- The
awsLogssettings have no effect on a Rack with either cloudwatch_disable or app_cloudwatch_disable set totrue. The retention policy is not applied, and existing log groups keep whatever retention was last set.