3 Commits
1.0 ... 1.0.2

Author SHA1 Message Date
8dff31b4ee bugfix 2024-08-09 02:18:45 -04:00
7746eb4af7 composer lock added 2024-08-09 00:35:45 -04:00
f5a35a1aba renaming for composer 2024-08-09 00:29:14 -04:00
8 changed files with 28 additions and 5 deletions

View File

@ -12,11 +12,12 @@
* @link https://TheTempusProject.com/Core * @link https://TheTempusProject.com/Core
* @license https://opensource.org/licenses/MIT [MIT LICENSE] * @license https://opensource.org/licenses/MIT [MIT LICENSE]
*/ */
namespace TheTempusProject\Canary; namespace TheTempusProject\Canary\Bin;
use TheTempusProject\Canary\Classes\TempusDebugger; use TheTempusProject\Canary\Classes\TempusDebugger;
use TheTempusProject\Canary\Classes\Logger; use TheTempusProject\Canary\Classes\Logger;
use Exception; use Exception;
class Canary { class Canary {
private static $lastCall = ''; private static $lastCall = '';

View File

@ -17,6 +17,7 @@ class Logger {
$this->file = fopen( $this->logFilePath, 'a' ); $this->file = fopen( $this->logFilePath, 'a' );
fwrite( $this->file, '===================------++++++++++------===================' . PHP_EOL ); fwrite( $this->file, '===================------++++++++++------===================' . PHP_EOL );
} }
public function setupLogFile() { public function setupLogFile() {
$this->logDirectory = rtrim( CANARY_DEBUG_DIRECTORY, DIRECTORY_SEPARATOR ); $this->logDirectory = rtrim( CANARY_DEBUG_DIRECTORY, DIRECTORY_SEPARATOR );
if ( ! is_dir( $this->logDirectory ) ) { if ( ! is_dir( $this->logDirectory ) ) {
@ -31,12 +32,13 @@ class Logger {
chmod( $this->logFilePath, 0777 ); chmod( $this->logFilePath, 0777 );
} }
} }
public function __destruct() { public function __destruct() {
fwrite( $this->file, '============================================================' . PHP_EOL ); fwrite( $this->file, '============================================================' . PHP_EOL );
fclose( $this->file ); fclose( $this->file );
} }
public function addLog( $type = 'log', $log ) { public function addLog( $type = 'log', $log = '' ) {
switch ( CANARY_DEBUG_TO_FILE_LEVEL ) { switch ( CANARY_DEBUG_TO_FILE_LEVEL ) {
case CANARY_DEBUG_LEVEL_ERROR: case CANARY_DEBUG_LEVEL_ERROR:
$acceptableLoggingLevels = [ $acceptableLoggingLevels = [

View File

@ -29,12 +29,12 @@
{ {
"psr-4": "psr-4":
{ {
"TheTempusProject\\Canary\\Classes\\": "classes" "TheTempusProject\\Canary\\Classes\\": "Classes"
}, },
"files": "files":
[ [
"config/constants.php", "Config/constants.php",
"bin/canary.php" "Bin/Canary.php"
] ]
} }
} }

20
composer.lock generated Normal file
View File

@ -0,0 +1,20 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "2766960a50e2f2f76a8ec41e644bc0de",
"packages": [],
"packages-dev": [],
"aliases": [],
"minimum-stability": "dev",
"stability-flags": [],
"prefer-stable": false,
"prefer-lowest": false,
"platform": {
"php": ">=8.1.0"
},
"platform-dev": [],
"plugin-api-version": "2.3.0"
}