fixes to support composer / packagist
This commit is contained in:
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2024 Joey Kimsey
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
@ -6,7 +6,6 @@
|
|||||||
* @author Joey Kimsey <Joey@thetempusproject.com>
|
* @author Joey Kimsey <Joey@thetempusproject.com>
|
||||||
*/
|
*/
|
||||||
namespace TheTempusProject\Canary\Classes;
|
namespace TheTempusProject\Canary\Classes;
|
||||||
use TheTempusProject\Bedrock\Functions\Date;
|
|
||||||
|
|
||||||
class Logger {
|
class Logger {
|
||||||
public $file;
|
public $file;
|
||||||
@ -97,12 +96,24 @@ class Logger {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function timestamp() {
|
private function timestamp() {
|
||||||
$dateString = Date::getReadableDate( time() );
|
$dateString = self::getReadableDate( time() );
|
||||||
return '['.$dateString.'] - ';
|
return '['.$dateString.'] - ';
|
||||||
}
|
}
|
||||||
|
|
||||||
private function typestamp( $type ) {
|
private function typestamp( $type ) {
|
||||||
$dateString = Date::getReadableDate( time() );
|
$dateString = self::getReadableDate( time() );
|
||||||
return '[' . strtoupper( $type ) . '] - ';
|
return '[' . strtoupper( $type ) . '] - ';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getReadableDate( $timestamp, $with_timezone = false ) {
|
||||||
|
if ( $with_timezone ) {
|
||||||
|
$date = new \DateTime();
|
||||||
|
$date->setTimestamp( $timestamp );
|
||||||
|
$timezone = new \DateTimeZone( self::getTimezone() );
|
||||||
|
$date->setTimezone( $timezone );
|
||||||
|
$formattedDate = $date->format('Y-m-d H:i:s');
|
||||||
|
return $formattedDate;
|
||||||
|
}
|
||||||
|
return date( 'Y-m-d H:i:s', $timestamp );
|
||||||
|
}
|
||||||
}
|
}
|
@ -1,27 +1,40 @@
|
|||||||
{
|
{
|
||||||
"name": "thetempusproject/tempusdebugger",
|
"name": "thetempusproject/canary",
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"description": "Framework for sending php messages to chrome for in-browser debugging.",
|
"description": "Functionality for tracking, logging, and sending log messages to chrome for debugging.",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"minimum-stability": "dev",
|
"minimum-stability": "dev",
|
||||||
"keywords": ["php","tools","debugging","thetempusproject"],
|
"keywords":
|
||||||
"homepage": "https://github.com/TheTempusProject/TempusDebugger",
|
[
|
||||||
"authors": [
|
"php",
|
||||||
|
"tools",
|
||||||
|
"debugging",
|
||||||
|
"thetempusproject"
|
||||||
|
],
|
||||||
|
"homepage": "https://git.thetempusproject.com/the-tempus-project/canary",
|
||||||
|
"authors":
|
||||||
|
[
|
||||||
{
|
{
|
||||||
"name": "Joey Kimsey",
|
"name": "Joey Kimsey",
|
||||||
"email": "Joey@thetempusproject.com",
|
"email": "Joey@thetempusproject.com",
|
||||||
"homepage": "https://TheTempusProject.com",
|
"homepage": "https://JoeyKimsey.com",
|
||||||
"role": "Lead Developer"
|
"role": "Lead Developer"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require":
|
||||||
"php": ">=5.4.0"
|
{
|
||||||
|
"php": ">=8.1.0"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload":
|
||||||
"classmap": [
|
{
|
||||||
"TempusDebugger.php",
|
"psr-4":
|
||||||
"TempusTools.php"
|
{
|
||||||
|
"TheTempusProject\\Canary\\Classes\\": "classes"
|
||||||
|
},
|
||||||
|
"files":
|
||||||
|
[
|
||||||
|
"config/constants.php",
|
||||||
|
"bin/canary.php"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,4 +50,6 @@ if ( ! defined('CANARY_DEBUG_TO_CONSOLE' ) ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Tell the app all constants have been loaded.
|
# Tell the app all constants have been loaded.
|
||||||
define( 'CANARY_CONSTANTS_LOADED', true );
|
if ( ! defined('CANARY_CONSTANTS_LOADED' ) ) {
|
||||||
|
define( 'CANARY_CONSTANTS_LOADED', true );
|
||||||
|
}
|
||||||
|
2
vendor/.gitignore
vendored
Normal file
2
vendor/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
*
|
||||||
|
!.gitignore
|
Reference in New Issue
Block a user