Skip to content
Advertisement

How to print string to console Yii2

I am really new to Yii2 and I am trying to print a simple string to the console. However, no matter what I do, I can’t really make it work. I am not sure if I have my Setup wrong or if I simply don’t use the functions as intended.

My TeamController.php was generated by Gii and the function I want to simply check if my code runs through looks like this:

JavaScript

UPDATE

Changed some configurations in the web.php within the config directory.:

JavaScript

Am I forgetting something or are other configurations wrong?

Advertisement

Answer

You can try to set flushInterval and exportInterval

JavaScript

sourse: https://yii2-cookbook-test.readthedocs.io/logging-problems-and-solutions/

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement