bootstrap_cli.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * CakePHP(tm) : Rapid Development Framework (https://cakephp.org)
  5. * Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  6. *
  7. * Licensed under The MIT License
  8. * For full copyright and license information, please see the LICENSE.txt
  9. * Redistributions of files must retain the above copyright notice.
  10. *
  11. * @copyright Copyright (c) Cake Software Foundation, Inc. (https://cakefoundation.org)
  12. * @link https://cakephp.org CakePHP(tm) Project
  13. * @since 3.0.0
  14. * @license https://opensource.org/licenses/mit-license.php MIT License
  15. */
  16. use Cake\Core\Configure;
  17. /*
  18. * Additional bootstrapping and configuration for CLI environments should
  19. * be put here.
  20. */
  21. // Set the fullBaseUrl to allow URLs to be generated in shell tasks.
  22. // This is useful when sending email from shells.
  23. //Configure::write('App.fullBaseUrl', php_uname('n'));
  24. // Set logs to different files so they don't have permission conflicts.
  25. if (Configure::check('Log.debug')) {
  26. Configure::write('Log.debug.file', 'cli-debug');
  27. }
  28. if (Configure::check('Log.error')) {
  29. Configure::write('Log.error.file', 'cli-error');
  30. }