Skip to content

Commit 8124754

Browse files
committed
feat: Add PSR-3 compliant logger implementation with console support
- Add ConsoleLogger that integrates with Symfony Console's OutputInterface - Respect console verbosity levels for different log priorities
1 parent 19b653d commit 8124754

23 files changed

+1214
-265
lines changed

.gitattributes

+12-10
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
/.github export-ignore
2-
/.gitattributes export-ignore
3-
/.gitignore export-ignore
4-
/phpunit.xml.dist export-ignore
5-
/tests export-ignore
6-
/.editorconfig export-ignore
7-
/.php_cs.dist.php export-ignore
8-
/psalm.xml export-ignore
9-
/psalm.xml.dist export-ignore
10-
/UPGRADING.md export-ignore
1+
/.github export-ignore
2+
/.gitattributes export-ignore
3+
/.gitignore export-ignore
4+
/phpunit.xml.dist export-ignore
5+
/tests export-ignore
6+
/.editorconfig export-ignore
7+
/.php_cs.dist.php export-ignore
8+
/psalm.xml export-ignore
9+
/psalm.xml.dist export-ignore
10+
/UPGRADING.md export-ignore
11+
* -text
12+

composer.json

+67-66
Original file line numberDiff line numberDiff line change
@@ -1,66 +1,67 @@
1-
{
2-
"name": "butschster/context-generator",
3-
"description": "Support package for content generation",
4-
"keywords": [
5-
"php8",
6-
"php",
7-
"llm",
8-
"prompt",
9-
"context"
10-
],
11-
"license": "MIT",
12-
"authors": [
13-
{
14-
"name": "Pavel Buchnev",
15-
"email": "[email protected]"
16-
}
17-
],
18-
"require": {
19-
"php": "^8.2",
20-
"guzzlehttp/guzzle": "^7.0",
21-
"league/html-to-markdown": "^5.1",
22-
"psr-discovery/http-client-implementations": "^1.0",
23-
"psr-discovery/http-factory-implementations": "^1.0",
24-
"psr/http-client": "^1.0",
25-
"psr/http-factory": "^1.0",
26-
"symfony/finder": "^6.0 | ^7.0 | ^8.0",
27-
"symfony/console": "^6.0 | ^7.0 | ^8.0",
28-
"nette/php-generator": "^4.1",
29-
"nikic/php-parser": "^v4.0 | ^v5.0"
30-
},
31-
"require-dev": {
32-
"buggregator/trap": "^1.13",
33-
"spiral/code-style": "^2.2.2",
34-
"phpunit/phpunit": "^10.2",
35-
"rector/rector": "^2.0",
36-
"vimeo/psalm": "^5.8"
37-
},
38-
"autoload": {
39-
"psr-4": {
40-
"Butschster\\ContextGenerator\\": "src"
41-
}
42-
},
43-
"autoload-dev": {
44-
"psr-4": {
45-
"Tests\\": "tests/src"
46-
}
47-
},
48-
"bin": [
49-
"context-generator"
50-
],
51-
"scripts": {
52-
"cs-check": "vendor/bin/php-cs-fixer fix --dry-run",
53-
"cs-fix": "vendor/bin/php-cs-fixer fix",
54-
"psalm": "vendor/bin/psalm --config=psalm.xml ./src",
55-
"psalm:ci": "psalm --output-format=github --shepherd --show-info=false --stats --threads=4",
56-
"refactor": "rector process --config=rector.php",
57-
"refactor:ci": "rector process --config=rector.php --dry-run --ansi",
58-
"test": "vendor/bin/phpunit",
59-
"test:cc": [
60-
"@putenv XDEBUG_MODE=coverage",
61-
"phpunit --coverage-clover=.build/phpunit/logs/clover.xml --color=always"
62-
]
63-
},
64-
"minimum-stability": "dev",
65-
"prefer-stable": true
66-
}
1+
{
2+
"name": "butschster/context-generator",
3+
"description": "Support package for content generation",
4+
"keywords": [
5+
"php8",
6+
"php",
7+
"llm",
8+
"prompt",
9+
"context"
10+
],
11+
"license": "MIT",
12+
"authors": [
13+
{
14+
"name": "Pavel Buchnev",
15+
"email": "[email protected]"
16+
}
17+
],
18+
"require": {
19+
"php": "^8.2",
20+
"guzzlehttp/guzzle": "^7.0",
21+
"league/html-to-markdown": "^5.1",
22+
"psr-discovery/http-client-implementations": "^1.0",
23+
"psr-discovery/http-factory-implementations": "^1.0",
24+
"psr/http-client": "^1.0",
25+
"psr/http-factory": "^1.0",
26+
"psr/log": "^3.0",
27+
"symfony/finder": "^6.0 | ^7.0 | ^8.0",
28+
"symfony/console": "^6.0 | ^7.0 | ^8.0",
29+
"nette/php-generator": "^4.1",
30+
"nikic/php-parser": "^v4.0 | ^v5.0"
31+
},
32+
"require-dev": {
33+
"buggregator/trap": "^1.13",
34+
"spiral/code-style": "^2.2.2",
35+
"phpunit/phpunit": "^10.2",
36+
"rector/rector": "^2.0",
37+
"vimeo/psalm": "^5.8"
38+
},
39+
"autoload": {
40+
"psr-4": {
41+
"Butschster\\ContextGenerator\\": "src"
42+
}
43+
},
44+
"autoload-dev": {
45+
"psr-4": {
46+
"Tests\\": "tests/src"
47+
}
48+
},
49+
"bin": [
50+
"context-generator"
51+
],
52+
"scripts": {
53+
"cs-check": "vendor/bin/php-cs-fixer fix --dry-run",
54+
"cs-fix": "vendor/bin/php-cs-fixer fix",
55+
"psalm": "vendor/bin/psalm --config=psalm.xml ./src",
56+
"psalm:ci": "psalm --output-format=github --shepherd --show-info=false --stats --threads=4",
57+
"refactor": "rector process --config=rector.php",
58+
"refactor:ci": "rector process --config=rector.php --dry-run --ansi",
59+
"test": "vendor/bin/phpunit",
60+
"test:cc": [
61+
"@putenv XDEBUG_MODE=coverage",
62+
"phpunit --coverage-clover=.build/phpunit/logs/clover.xml --color=always"
63+
]
64+
},
65+
"minimum-stability": "dev",
66+
"prefer-stable": true
67+
}

0 commit comments

Comments
 (0)