Skip to content

Commit

Permalink
Merge pull request #125 from julienloizelet/feat/no-log-rotate
Browse files Browse the repository at this point in the history
feat(logs): Do not rotate log files
  • Loading branch information
julienloizelet authored Mar 30, 2023
2 parents adc225d + 04c8e26 commit c0f5c1f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ The [public API](https://semver.org/spec/v2.0.0.html#spec-item-1) of this librar

---

## [1.4.0](https://github.com/crowdsecurity/php-cs-bouncer/releases/tag/v1.4.0) - 2023-03-30
[_Compare with previous release_](https://github.com/crowdsecurity/php-cs-bouncer/compare/v1.3.0...v1.4.0)


### Changed
- Do not rotate log files of standalone bouncer

---


## [1.3.0](https://github.com/crowdsecurity/php-cs-bouncer/releases/tag/v1.3.0) - 2023-03-24
[_Compare with previous release_](https://github.com/crowdsecurity/php-cs-bouncer/compare/v1.2.0...v1.3.0)

Expand Down
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"require": {
"php": ">=7.2.5",
"crowdsec/remediation-engine": "^3.1.1",
"crowdsec/common": "^2.1.0",
"symfony/config": "^4.4.27 || ^5.2 || ^6.0",
"twig/twig": "^3.4.2",
"gregwar/captcha": "^1.1",
Expand Down
2 changes: 1 addition & 1 deletion src/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class Constants extends RemConstants
/** @var string Path for html templates folder (e.g. ban and captcha wall) */
public const TEMPLATES_DIR = __DIR__ . "/templates";
/** @var string The last version of this library */
public const VERSION = 'v1.3.0';
public const VERSION = 'v1.4.0';
/** @var string The "disabled" x-forwarded-for setting */
public const X_FORWARDED_DISABLED = 'no_forward';
}
3 changes: 2 additions & 1 deletion src/StandaloneBouncer.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class StandaloneBouncer extends AbstractBouncer
*/
public function __construct(array $configs, LoggerInterface $logger = null)
{
$this->logger = $logger ?: new FileLog($configs, 'php_standalone_bouncer');
$logConfigs = array_merge($configs, ['no_rotation' => true]);
$this->logger = $logger ?: new FileLog($logConfigs, 'php_standalone_bouncer');
$configs = $this->handleTrustedIpsConfig($configs);
$configs['user_agent_version'] = Constants::VERSION;
$configs['user_agent_suffix'] = 'Standalone';
Expand Down

0 comments on commit c0f5c1f

Please sign in to comment.