How to log the actual value of a variable or constant in a plugin or the wp core
-
I just want to know the standard wordpress way to write the actual value of a variable or constant in a PHP file of a plugin or the wp core at any code line to a log file. It would be cool if the output could look like:
timespamp | filename | line-number | name (of variable or constant) | the actual value of the variable or constant
if the variable is an array it would be nice if it would be possible to list the key/value or name/value pairs as sublist like:
timespamp | filename | line-number | name (of the array variable) | is an array
key/value
key/value
key/value
…
or objects:
timespamp | filename | line-number | name (of the object) | is an objector like that
May be there is a plugin for that available. I don’t want to reinvent the wheel!
Thank you for support!
Tom
- The topic ‘How to log the actual value of a variable or constant in a plugin or the wp core’ is closed to new replies.