refactor: remove hardcoded credentials from config

- Strip configuration.local.php to logger-only defaults
- Remove db, solr, session, checkfile_url, worker IDs (unused legacy)
- Clean credential comments from logger config files
- Add .env.example template
- Add .env to .gitignore
This commit is contained in:
Guillermo Pages
2026-01-14 14:15:02 +01:00
parent 7e79eca195
commit b6f048d81c
6 changed files with 61 additions and 0 deletions

6
.env.example Normal file
View File

@@ -0,0 +1,6 @@
# php-bsrutils environment variables
# This library only needs logging configuration if you override the defaults.
# Most applications define their own logging config, making this optional.
# Optional: Override default log file location
# LOG_FILE=/var/log/app/log.txt

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@ vendor/
*.swp
output
composer.lock
.env

View File

@@ -0,0 +1,15 @@
<?php
use Bsr\Utils\Logger\Logger;
/**
* Default configuration for php-bsrutils library.
* Contains only logger defaults needed for the Logger class.
* Application-specific config should be in the consuming application's config files.
*/
return array(
'log' => array(
'file' => realpath(dirname(__FILE__) . '/..') . '/log/log.txt',
'format' => '%ip% - [%date%] - %status% %error% - %time% - %func%',
'verbosity' => Logger::NORMAL,
),
);

View File

@@ -0,0 +1,13 @@
<?php
use Bsr\Utils\Logger\Logger;
/**
* Logger configuration - normal verbosity
*/
return array(
'log' => array(
'file' => realpath(dirname(__FILE__) . '/..') . '/log/log.txt',
'format' => '%ip% - [%date%] - %status% %error% - %time% - %func%',
'verbosity' => Logger::NORMAL,
),
);

View File

@@ -0,0 +1,13 @@
<?php
use Bsr\Utils\Logger\Logger;
/**
* Logger configuration - quiet verbosity
*/
return array(
'log' => array(
'file' => realpath(dirname(__FILE__) . '/..') . '/log/log.txt',
'format' => '%ip% - [%date%] - %status% %error% - %time% - %func%',
'verbosity' => Logger::QUIET,
),
);

View File

@@ -0,0 +1,13 @@
<?php
use Bsr\Utils\Logger\Logger;
/**
* Logger configuration - verbose verbosity
*/
return array(
'log' => array(
'file' => realpath(dirname(__FILE__) . '/..') . '/log/log.txt',
'format' => '%ip% - [%date%] - %status% %error% - %time% - %func%',
'verbosity' => Logger::VERBOSE,
),
);