Skip to content

Commit c0f5c1f

Browse files
Merge pull request #125 from julienloizelet/feat/no-log-rotate
feat(logs): Do not rotate log files
2 parents adc225d + 04c8e26 commit c0f5c1f

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,16 @@ The [public API](https://semver.org/spec/v2.0.0.html#spec-item-1) of this librar
99

1010
---
1111

12+
## [1.4.0](https://github.com/crowdsecurity/php-cs-bouncer/releases/tag/v1.4.0) - 2023-03-30
13+
[_Compare with previous release_](https://github.com/crowdsecurity/php-cs-bouncer/compare/v1.3.0...v1.4.0)
14+
15+
16+
### Changed
17+
- Do not rotate log files of standalone bouncer
18+
19+
---
20+
21+
1222
## [1.3.0](https://github.com/crowdsecurity/php-cs-bouncer/releases/tag/v1.3.0) - 2023-03-24
1323
[_Compare with previous release_](https://github.com/crowdsecurity/php-cs-bouncer/compare/v1.2.0...v1.3.0)
1424

composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
"require": {
4242
"php": ">=7.2.5",
4343
"crowdsec/remediation-engine": "^3.1.1",
44+
"crowdsec/common": "^2.1.0",
4445
"symfony/config": "^4.4.27 || ^5.2 || ^6.0",
4546
"twig/twig": "^3.4.2",
4647
"gregwar/captcha": "^1.1",

src/Constants.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ class Constants extends RemConstants
3939
/** @var string Path for html templates folder (e.g. ban and captcha wall) */
4040
public const TEMPLATES_DIR = __DIR__ . "/templates";
4141
/** @var string The last version of this library */
42-
public const VERSION = 'v1.3.0';
42+
public const VERSION = 'v1.4.0';
4343
/** @var string The "disabled" x-forwarded-for setting */
4444
public const X_FORWARDED_DISABLED = 'no_forward';
4545
}

src/StandaloneBouncer.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ class StandaloneBouncer extends AbstractBouncer
2828
*/
2929
public function __construct(array $configs, LoggerInterface $logger = null)
3030
{
31-
$this->logger = $logger ?: new FileLog($configs, 'php_standalone_bouncer');
31+
$logConfigs = array_merge($configs, ['no_rotation' => true]);
32+
$this->logger = $logger ?: new FileLog($logConfigs, 'php_standalone_bouncer');
3233
$configs = $this->handleTrustedIpsConfig($configs);
3334
$configs['user_agent_version'] = Constants::VERSION;
3435
$configs['user_agent_suffix'] = 'Standalone';

0 commit comments

Comments
 (0)