Compare commits
No commits in common. "master" and "1.0.0" have entirely different histories.
5 changed files with 6 additions and 59 deletions
27
CHANGELOG.md
27
CHANGELOG.md
|
@ -5,33 +5,6 @@ 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).
|
||||
|
||||
## [1.0.3] - 2025-03-14
|
||||
|
||||
Minor changes to the project
|
||||
|
||||
### Changed
|
||||
|
||||
- Updated dependency remote address
|
||||
|
||||
|
||||
## [1.0.2] - 2025-01-27
|
||||
|
||||
Minor changes to the project
|
||||
|
||||
### Changed
|
||||
- ExceptionDetails now accepts a string as a type for the $line and $code parameter, this will automatically
|
||||
convert the string to an integer.
|
||||
|
||||
|
||||
## [1.0.1] - 2025-01-22
|
||||
|
||||
Minor changes to the project
|
||||
|
||||
### Fixed
|
||||
- Fixed issue where \LogLib2\Classes\Utilities::getSafeValue(mixed $input) would return
|
||||
a null value when the typed output is `string` by including a branch that converts
|
||||
the `gettype($input)` to a string when the input is null.
|
||||
|
||||
|
||||
## [1.0.0] - 2025-01-22
|
||||
|
||||
|
|
15
README.md
15
README.md
|
@ -23,25 +23,10 @@ Aside from Console logging, all other handlers supports up to 5 different log fo
|
|||
LogLib2 is designed to be silent-failing, this means that if an error occurs while logging an event, the library will
|
||||
silently fail and continue to log events, this is to prevent the application from crashing due to a logging error.
|
||||
|
||||
## Community
|
||||
|
||||
This project and many others from Nosial are available on multiple publicly available and free git repositories at
|
||||
|
||||
- [n64](https://git.n64.cc/nosial/loglib2)
|
||||
- [GitHub](https://github.com/nosial/loglib2)
|
||||
- [Codeberg](https://codeberg.org/nosial/loglib2)
|
||||
|
||||
Issues & Pull Requests are frequently checked and to be referenced accordingly in commits and changes, Nosial remains
|
||||
dedicated to keep these repositories up to date when possible.
|
||||
|
||||
For questions & discussions see the public Telegram community at [@NosialDiscussions](https://t.me/NosialDiscussions).
|
||||
We do encourage community support and discussions, please be respectful and follow the rules of the community.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
<!-- TOC -->
|
||||
* [LogLib2](#loglib2)
|
||||
* [Community](#community)
|
||||
* [Table of Contents](#table-of-contents)
|
||||
* [Installation](#installation)
|
||||
* [Compiling](#compiling)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"assembly": {
|
||||
"name": "LogLib2",
|
||||
"package": "net.nosial.loglib2",
|
||||
"version": "1.0.3",
|
||||
"version": "1.0.0",
|
||||
"uuid": "11ac2c4d-94e5-4cc1-a2d3-054ac3f425b4"
|
||||
},
|
||||
"build": {
|
||||
|
@ -25,7 +25,7 @@
|
|||
{
|
||||
"name": "net.nosial.optslib",
|
||||
"version": "latest",
|
||||
"source": "nosial/optslib=latest@github"
|
||||
"source": "nosial/libs.opts=latest@n64"
|
||||
}
|
||||
],
|
||||
"configurations": [
|
||||
|
|
|
@ -115,8 +115,7 @@
|
|||
|
||||
return match(strtolower(gettype($input)))
|
||||
{
|
||||
'boolean', 'integer', 'double', 'float', 'string' => $input,
|
||||
'null' => 'null',
|
||||
'boolean', 'integer', 'double', 'float', 'string', 'null' => $input,
|
||||
default => sprintf('[%s]', strtoupper(gettype($input))),
|
||||
};
|
||||
}
|
||||
|
|
|
@ -23,24 +23,14 @@
|
|||
*
|
||||
* @param string $name The name of the exception.
|
||||
* @param string $message The exception message.
|
||||
* @param string|int|null $code The exception code, or null if not specified. If a string is provided, it will be converted to an integer.
|
||||
* @param int|null $code The exception code, or null if not specified.
|
||||
* @param string|null $file The file name, or null if not specified.
|
||||
* @param string|int|null $line The line number, or null if not specified. If a string is provided, it will be converted to an integer.
|
||||
* @param int|null $line The line number, or null if not specified.
|
||||
* @param StackTrace[]|null $trace The array of StackTrace instances, or null if not provided.
|
||||
* @param ExceptionDetails|null $previous The previous exception, or null if not specified.
|
||||
*/
|
||||
public function __construct(string $name, string $message, null|string|int $code=null, ?string $file=null, null|string|int $line=null, ?array $trace=null, ?ExceptionDetails $previous=null)
|
||||
public function __construct(string $name, string $message, ?int $code=null, ?string $file=null, ?int $line=null, ?array $trace=null, ?ExceptionDetails $previous=null)
|
||||
{
|
||||
if(is_string($line))
|
||||
{
|
||||
$line = (int)$line;
|
||||
}
|
||||
|
||||
if(is_string($code))
|
||||
{
|
||||
$code = (int)$code;
|
||||
}
|
||||
|
||||
$this->name = $name;
|
||||
$this->message = $message;
|
||||
$this->code = $code;
|
||||
|
|
Loading…
Add table
Reference in a new issue