Closed phptek closed 8 years ago
I think it should be the other way around, we already have a way to define env especific configuration in YAML in core. But that means we have to make the SS_Log
class accept these configuration keys, which wouldn't be a Raygun specific enhancement. Rough example:
---
Only:
environment: 'live'
---
SS_Log:
loggers:
RaygunLogWriter:
api_key: 'ABCDEF123456=='
level: 'SS_Log::WARNING'
So, I would have thought that 19ff8ae24d6d7380bd7e627252cfb1c27bf9c8c2 allows for this; I'm a bit confused as to why it doesn't?
Failing that, it also supports an _ss_environment.php
value.
Yeah, so as Sam says, that's already possible - closing.
Currently, the module isn't picky about what it reports or from where. The former is resolved by @chillu's filter example, the latter would be good to allow dev's to optionally enable Raygun logging on a per environment basis.
Yes it's easy to apply ad-hoc project-specific config, but it's messy in mysite/_config.php, so the ability apply something like this in project config would be better:
This would obviously ensure that Raygun logged only in
test
andlive
environments. Something like the following in the module's own_config.php
(Off the top of my head)