diff --git a/CHANGELOG.md b/CHANGELOG.md
index a53c511..df63001 100755
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## 2.2.1 - 2024-07-12
+### Added
+- Added config option `paysera_logging_extra.sentry.minimum_log_level` to set from which level logs will be sent to Sentry
+- Added config option `paysera_logging_extra.monolog.minimum_introspection_level` to set from which level logs will be introspected
+
## 2.2.0
### Added
- Added Symfony ^6 support.
diff --git a/src/DependencyInjection/Configuration.php b/src/DependencyInjection/Configuration.php
index d679554..a84df0b 100644
--- a/src/DependencyInjection/Configuration.php
+++ b/src/DependencyInjection/Configuration.php
@@ -4,6 +4,7 @@
namespace Paysera\LoggingExtraBundle\DependencyInjection;
+use Monolog\Logger;
use Symfony\Component\Config\Definition\Builder\TreeBuilder;
use Symfony\Component\Config\Definition\ConfigurationInterface;
@@ -20,8 +21,36 @@ public function getConfigTreeBuilder()
}
$children = $rootNode->children();
- $children->scalarNode('application_name')->isRequired();
- $children->arrayNode('grouped_exceptions')->prototype('scalar');
+ $children
+ ->scalarNode('application_name')
+ ->isRequired()
+ ;
+ $children
+ ->arrayNode('grouped_exceptions')
+ ->prototype('scalar')
+ ;
+ $children
+ ->arrayNode('monolog')
+ ->addDefaultsIfNotSet()
+ ->children()
+ ->scalarNode('minimum_introspection_level')
+ ->isRequired()
+ ->defaultValue(Logger::ERROR)
+ ->end()
+ ->end()
+ ->end()
+ ;
+ $children
+ ->arrayNode('sentry')
+ ->addDefaultsIfNotSet()
+ ->children()
+ ->scalarNode('minimum_log_level')
+ ->isRequired()
+ ->defaultValue(Logger::ERROR)
+ ->end()
+ ->end()
+ ->end()
+ ;
return $treeBuilder;
}
diff --git a/src/DependencyInjection/PayseraLoggingExtraExtension.php b/src/DependencyInjection/PayseraLoggingExtraExtension.php
index aa3e9c1..b0bbdd8 100644
--- a/src/DependencyInjection/PayseraLoggingExtraExtension.php
+++ b/src/DependencyInjection/PayseraLoggingExtraExtension.php
@@ -21,5 +21,7 @@ public function load(array $configs, ContainerBuilder $container)
$container->setParameter('paysera_logging_extra.application_name', $config['application_name']);
$container->setParameter('paysera_logging_extra.grouped_exceptions', $config['grouped_exceptions']);
+ $container->setParameter('paysera_logging_extra.monolog.minimum_introspection_level', $config['monolog']['minimum_introspection_level']);
+ $container->setParameter('paysera_logging_extra.sentry.minimum_log_level', $config['sentry']['minimum_log_level']);
}
}
diff --git a/src/Resources/config/services/handlers.xml b/src/Resources/config/services/handlers.xml
index fe44e54..73db617 100644
--- a/src/Resources/config/services/handlers.xml
+++ b/src/Resources/config/services/handlers.xml
@@ -10,7 +10,7 @@
- Monolog\Logger::ERROR
+ %paysera_logging_extra.sentry.minimum_log_level%
diff --git a/src/Resources/config/services/processors.xml b/src/Resources/config/services/processors.xml
index 2750dc8..d76004c 100644
--- a/src/Resources/config/services/processors.xml
+++ b/src/Resources/config/services/processors.xml
@@ -16,7 +16,7 @@
class="Monolog\Processor\IntrospectionProcessor">
- ERROR
+ %paysera_logging_extra.monolog.minimum_introspection_level%