Skip to content

Commit

Permalink
Merge pull request #4067 from paulbalandan/logging
Browse files Browse the repository at this point in the history
Remove discussion on LoggerAwareTrait
  • Loading branch information
samsonasik authored Jan 5, 2021
2 parents 5a8e757 + 0e1a813 commit 83e44c6
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions user_guide_src/source/general/logging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,3 @@ like Composer. Next, you should modify ``/app/Config/Services.php`` to point the
alias to your new class name.

Now, any call that is done through the ``log_message()`` function will use your library instead.

LoggerAware Trait
=================

If you would like to implement your libraries in a framework-agnostic method, you can use
the ``CodeIgniter\Log\LoggerAwareTrait`` which implements the ``setLogger()`` method for you.
Then, when you use your library under different environments for frameworks, your library should
still be able to log as it would expect, as long as it can find a PSR3 compatible logger.

0 comments on commit 83e44c6

Please sign in to comment.