Skip to content

Commit 51cd7cf

Browse files
joamagclaude
andcommitted
chore: add COLONY_LOGGING_LOGSTASH config alias
- Added COLONY_LOGGING_LOGSTASH configuration option with fallback to LOGGING_LOGSTASH - Updated README configuration documentation - Updated CHANGELOG unreleased section Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 1057afb commit 51cd7cf

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313

1414
### Changed
1515

16-
*
16+
* Added `COLONY_LOGGING_LOGSTASH` config alias with fallback to `LOGGING_LOGSTASH` for Logstash adapter activation
1717

1818
### Fixed
1919

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ To actually do something useful, look into [How to Establish your Colony in 3 Ea
4040

4141
## Configuration
4242

43-
| Name | Type | Default | Description |
44-
| -------------------- | ------ | ------------- | ------------------------------------------------------------------------------------- |
45-
| **RUN_MODE** | `str` | `development` | The mode in which the Colony will be running. |
46-
| **LOGGING_LOGSTASH** | `bool` | `False` | If the [Logstash](https://www.elastic.co/logstash) logging adapter should be enabled. |
43+
| Name | Type | Default | Description |
44+
| --------------------------- | ------ | ------------- | -------------------------------------------------------------------------------------------------------------------- |
45+
| **RUN_MODE** | `str` | `development` | The mode in which the Colony will be running. |
46+
| **COLONY_LOGGING_LOGSTASH** | `bool` | `False` | If the [Logstash](https://www.elastic.co/logstash) logging adapter should be enabled (fallback: `LOGGING_LOGSTASH`). |
4747

4848
## Usage
4949

src/colony/base/loggers.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,11 @@ def is_ready(cls):
288288
import logstash
289289
except ImportError:
290290
return False
291-
if not config.conf("LOGGING_LOGSTASH", False, cast=bool):
291+
if not config.conf(
292+
"COLONY_LOGGING_LOGSTASH",
293+
config.conf("LOGGING_LOGSTASH", False, cast=bool),
294+
cast=bool,
295+
):
292296
return False
293297
return True
294298

0 commit comments

Comments
 (0)