Skip to content

Commit c97227a

Browse files
committed
Make logger threshold to be environment-specific
1 parent 6716c5a commit c97227a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

app/Config/Logger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ class Logger extends BaseConfig
3838
*
3939
* @var array|int
4040
*/
41-
public $threshold = 4;
41+
public $threshold = (ENVIRONMENT === 'production') ? 4 : 9;
4242

4343
/**
4444
* --------------------------------------------------------------------------

user_guide_src/source/changelogs/v4.3.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ Error Handling
224224
- You can now log deprecation warnings instead of throwing exceptions. See :ref:`logging_deprecation_warnings` for details.
225225
- Logging of deprecations is turned on by default.
226226
- To *temporarily* enable throwing of deprecations, set the environment variable ``CODEIGNITER_SCREAM_DEPRECATIONS`` to a truthy value.
227+
- ``Config\Logger::$threshold`` is now, by default, environment-specific. For production environment, default threshold is still ``4`` but changed to ``9`` for other environments.
227228

228229
Others
229230
======
@@ -272,4 +273,3 @@ Bugs Fixed
272273
**********
273274

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

0 commit comments

Comments
 (0)