Skip to content
This repository was archived by the owner on Jun 16, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Log4php (joaomfrebelo)
# Log4php (viridem)

This project is a fork of Apache log4php, to make it compatible with php version 8.0 and above.

Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "joaomfrebelo/log4php",
"name": "viridem/log4php",
"description": "A versatile logging framework for PHP. Forked from apache/log4php",
"keywords": [
"log",
Expand All @@ -10,20 +10,20 @@
"type": "library",
"license": "Apache-2.0",
"support": {
"issues": "https://github.com/joaomfrebelo/log4php/issues",
"source": "https://github.com/joaomfrebelo/log4php",
"email": "joaomfrebelo@gmail.com"
"issues": "https://github.com/viridem-team/log4php/issues",
"source": "https://github.com/viridem-team/log4php",
"email": "github@viridem.ca"
},
"autoload": {
"classmap": [
"src/main/php/"
]
},
"require": {
"php": "8.0.* || 8.1.* || 8.2.* || 8.3.*",
"php": "8.3.* || 8.4.* || 8.5.*",
"ext-libxml": "*",
"ext-simplexml": "*",
"mongodb/mongodb": "^1.15.0",
"mongodb/mongodb": "^2.0.0",
"ext-mongodb": "*",
"ext-pdo": "*"
},
Expand Down
14 changes: 7 additions & 7 deletions src/main/php/helpers/LoggerOptionConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ public static function toIntegerEx($value): int
if (is_integer($value)) {
return $value;
}
if (is_numeric($value) && ($value == (integer)$value)) {
return (integer)$value;
if (is_numeric($value) && ($value == (int)$value)) {
return (int)$value;
}

throw new LoggerException("Given value [" . var_export($value, true) . "] cannot be converted to integer.");
Expand All @@ -117,8 +117,8 @@ public static function toPositiveIntegerEx($value): int
if (is_integer($value) && $value > 0) {
return $value;
}
if (is_numeric($value) && ($value == (integer)$value) && $value > 0) {
return (integer)$value;
if (is_numeric($value) && ($value == (int)$value) && $value > 0) {
return (int)$value;
}

throw new LoggerException("Given value [" . var_export($value, true) . "] cannot be converted to a positive integer.");
Expand All @@ -140,7 +140,7 @@ public static function toLevelEx($value): LoggerLevel
}

/**
* Converts a value to a valid file size (integer).
* Converts a value to a valid file size (int).
*
* Supports 'KB', 'MB' and 'GB' suffixes, where KB = 1024 B etc.
*
Expand All @@ -164,7 +164,7 @@ public static function toFileSizeEx(mixed $value): int
}

if (is_numeric($value)) {
return (integer)$value;
return (int)$value;
}

if (!is_string($value)) {
Expand All @@ -190,7 +190,7 @@ public static function toFileSizeEx(mixed $value): int
break;
}

return (integer)$size;
return (int)$size;
}

throw new LoggerException("Given value [$value] cannot be converted to a file size.");
Expand Down
4 changes: 2 additions & 2 deletions src/main/php/helpers/LoggerPatternParser.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ private function parseModifiers($modifiers): LoggerFormattingInfo
$parts = explode('.', $modifiers);

if (!empty($parts[0])) {
$minPart = (integer)$parts[0];
$minPart = (int)$parts[0];
$info->min = abs($minPart);
$info->padLeft = ($minPart > 0);
}

if (!empty($parts[1])) {
$maxPart = (integer)$parts[1];
$maxPart = (int)$parts[1];
$info->max = abs($maxPart);
$info->trimLeft = ($maxPart < 0);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/php/pattern/LoggerPatternConverterClass.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function activateOptions(): void
{
// Parse the option (desired output length)
if (isset($this->option) && is_numeric($this->option) && $this->option >= 0) {
$this->length = (integer)$this->option;
$this->length = (int)$this->option;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/main/php/pattern/LoggerPatternConverterLogger.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function activateOptions(): void
{
// Parse the option (desired output length)
if (isset($this->option) && is_numeric($this->option) && $this->option >= 0) {
$this->length = (integer)$this->option;
$this->length = (int)$this->option;
}
}

Expand Down