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:
6
.env.example
Normal file
6
.env.example
Normal 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
1
.gitignore
vendored
@@ -2,3 +2,4 @@ vendor/
|
||||
*.swp
|
||||
output
|
||||
composer.lock
|
||||
.env
|
||||
|
||||
15
config/configuration.local.php
Normal file
15
config/configuration.local.php
Normal 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,
|
||||
),
|
||||
);
|
||||
13
config/configuration.logger.normal.php
Normal file
13
config/configuration.logger.normal.php
Normal 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,
|
||||
),
|
||||
);
|
||||
13
config/configuration.logger.quiet.php
Normal file
13
config/configuration.logger.quiet.php
Normal 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,
|
||||
),
|
||||
);
|
||||
13
config/configuration.logger.verbose.php
Normal file
13
config/configuration.logger.verbose.php
Normal 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,
|
||||
),
|
||||
);
|
||||
Reference in New Issue
Block a user