Skip to content

Commit

Permalink
Make logger threshold to be environment-specific
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbalandan committed Nov 1, 2022
1 parent 6716c5a commit c97227a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/Config/Logger.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Logger extends BaseConfig
*
* @var array|int
*/
public $threshold = 4;
public $threshold = (ENVIRONMENT === 'production') ? 4 : 9;

/**
* --------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion user_guide_src/source/changelogs/v4.3.0.rst
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ Error Handling
- You can now log deprecation warnings instead of throwing exceptions. See :ref:`logging_deprecation_warnings` for details.
- Logging of deprecations is turned on by default.
- To *temporarily* enable throwing of deprecations, set the environment variable ``CODEIGNITER_SCREAM_DEPRECATIONS`` to a truthy value.
- ``Config\Logger::$threshold`` is now, by default, environment-specific. For production environment, default threshold is still ``4`` but changed to ``9`` for other environments.

Others
======
Expand Down Expand Up @@ -272,4 +273,3 @@ Bugs Fixed
**********

- Fixed a bug when all types of ``Prepared Queries`` were returning a ``Result`` object instead of a bool value for write-type queries.

0 comments on commit c97227a

Please sign in to comment.