Skip to content

Commit b9c0c45

Browse files
authored
Merge pull request #1 from KaririCode-Framework/develop
Enhance Logging and Resilience Components
2 parents a4a832e + 98e9e7c commit b9c0c45

File tree

123 files changed

+3687
-1304
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+3687
-1304
lines changed

.env.example

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,22 @@ KARIRICODE_PHP_VERSION=8.3
33
KARIRICODE_PHP_PORT=9303
44

55
# Canal de log padrão
6-
LOG_CHANNEL=stack
6+
LOG_CHANNEL=file
77

88
# Nível de log padrão
99
LOG_LEVEL=debug
10+
LOG_ENCRYPTION_KEY=83302e6472acda6a8aeadf78409ceda3959994991393cdafbe23d2a46a148ba4
1011

11-
# URL do Webhook do Slack para logs
12-
LOG_SLACK_WEBHOOK_URL=https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX
12+
# Slack para logs
13+
SLACK_BOT_TOKEN=xoxb-your-bot-token-here
14+
SLACK_CHANNEL=#your-channel-name
1315

1416
# URL e Porta do Papertrail
1517
PAPERTRAIL_URL=logs.papertrailapp.com
1618
PAPERTRAIL_PORT=12345
1719

1820
# Formatter para logs stderr
19-
LOG_STDERR_FORMATTER=\KaririCode\Logging\Formatter\JsonFormatter
21+
LOG_STDERR_FORMATTER=json
2022

2123
# Índice do Elasticsearch para logs
2224
ELASTIC_LOG_INDEX=logging-logs
@@ -25,19 +27,29 @@ ELASTIC_LOG_INDEX=logging-logs
2527
ASYNC_LOG_ENABLED=true
2628

2729
# Habilitar logs de consulta
28-
QUERY_LOG_ENABLED=false
29-
QUERY_LOG_CHANNEL=daily
30+
QUERY_LOG_ENABLED=true
31+
QUERY_LOG_CHANNEL=file
3032
QUERY_LOG_THRESHOLD=100
3133

3234
# Habilitar logs de desempenho
33-
PERFORMANCE_LOG_ENABLED=false
34-
PERFORMANCE_LOG_CHANNEL=daily
35+
PERFORMANCE_LOG_ENABLED=true
36+
PERFORMANCE_LOG_CHANNEL=file
3537
PERFORMANCE_LOG_THRESHOLD=1000
3638

3739
# Habilitar logs de erro
3840
ERROR_LOG_ENABLED=true
39-
ERROR_LOG_CHANNEL=daily
41+
ERROR_LOG_CHANNEL=file
4042

4143
# Configurações do limpador de logs
4244
LOG_CLEANER_ENABLED=true
4345
LOG_CLEANER_KEEP_DAYS=30
46+
47+
# Configurações do CircuitBreaker
48+
CIRCUIT_BREAKER_FAILURE_THRESHOLD=3
49+
CIRCUIT_BREAKER_RESET_TIMEOUT=60
50+
51+
# Configurações do Retry
52+
RETRY_MAX_ATTEMPTS=3
53+
RETRY_DELAY=1000
54+
RETRY_MULTIPLIER=2
55+
RETRY_JITTER=100

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,7 @@ temp/
5959
tmp/
6060
.vscode/launch.json
6161
.vscode/extensions.json
62-
tests/lista_de_arquivos.php
62+
tests/lista_de_arquivos.php
63+
tests/lista_de_arquivos_test.php
64+
lista_de_arquivos.txt
65+
lista_de_arquivos_tests.txt

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Initial configurations
2-
PHP_SERVICE := kariricode-contract
2+
PHP_SERVICE := kariricode-logging
33
DC := docker-compose
44

55
# Command to execute commands inside the PHP container

composer.json

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,7 @@
5050
"mockery/mockery": "^1.6",
5151
"enlightn/security-checker": "^2.0"
5252
},
53-
"scripts": {
54-
"post-package-install": [
55-
"KaririCode\\Logging\\Util\\ComposerScripts::postPackageInstall"
56-
]
57-
},
53+
"scripts": {},
5854
"extra": {
5955
"branch-alias": {
6056
"dev-main": "1.0.x-dev"

composer.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)