Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

writing arrays #96

Open
cgapperi opened this issue Feb 27, 2019 · 1 comment
Open

writing arrays #96

cgapperi opened this issue Feb 27, 2019 · 1 comment

Comments

@cgapperi
Copy link

From the first example it appears arrays should be written to log. When I try to include an array, I get

PHP Notice: Array to string conversion in /data/Data_Cleaning/CvR/wip_plib/vendor/katzgrau/klogger/src/Logger.php on line 285

log shows

[2019-02-27 10:30:01.878930] [info] Array [2019-02-27 10:30:01.879091] [info] /data/Data_Cleaning/CvR/wip_pbin/file_cleaning/rename/NEX* [2019-02-27 10:30:01.879139] [info] Found: nex [2019-02-27 10:30:01.879228] [debug] Array [2019-02-27 10:30:01.879385] [info] NEX_IMR_01012019 renamed nex_wk01_01012019.txt [2019-02-27 10:30:01.879467] [info] NEX_IMR_01022019 renamed nex_wk01_01022019.txt [2019-02-27 10:30:01.879591] [info] NEX_IMR_01032019 renamed nex_wk01_01032019.txt [2019-02-27 10:30:01.879656] [info] NEX_IMR_01042019 renamed nex_wk01_01042019.txt [2019-02-27 10:30:01.879723] [info] NEX_IMR_01052019 renamed nex_wk01_01052019.txt [2019-02-27 10:30:01.879789] [info] NEX_IMR_01062019 renamed nex_wk01_01062019.txt [2019-02-27 10:30:01.879880] [info] NEX_IMR_01072019 renamed nex_wk01_01072019.txt [2019-02-27 10:30:01.879951] [info] NEX_IMR_01082019 renamed nex_wk02_01082019.txt [2019-02-27 10:30:01.880014] [info] NEX_IMR_01092019 renamed nex_wk02_01092019.txt

Am I missing something?

@katzgrau
Copy link
Owner

Can you post an example of usage?

From the docs, the second params should accept objects/arrays:

$logger->debug('Got these users from the Database.', $users);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants