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

console.table support #9

Closed
bkdotcom opened this issue Oct 14, 2019 · 5 comments
Closed

console.table support #9

bkdotcom opened this issue Oct 14, 2019 · 5 comments
Labels
incomplete The issue description is incomplete

Comments

@bkdotcom
Copy link

bkdotcom commented Oct 14, 2019

As referenced in #5 table support is limited / breaks output

https://developer.mozilla.org/en-US/docs/Web/API/Console/table
should accept obj / list of obj, etc

@mindplay-dk
Copy link
Contributor

I don't know what this is about.

If you want someone else to look into your issue, you need to post a detailed description of your problem and maybe propose a solution - or submit a PR.

@mindplay-dk mindplay-dk added the incomplete The issue description is incomplete label Oct 14, 2019
@bkdotcom
Copy link
Author

https://github.com/kodus/server-log/

you can use this extension as a drop-in replacement for the original extension.

however.. If I include

ChromePhp::table(array('foo'=>'bar'));

I'll get no output, only a spinner

@mindplay-dk
Copy link
Contributor

I referenced the documentation for this feature:

console.table(array)

Logs an array of objects as a table.

Note that we don't use the native DevTools console - this is by design, since we don't want client and server logs mixed into the client-side console.

So this may not have all the "hidden features" of the native DevTools console.

If you'd like to enhance this feature, feel free to submit a PR.

@bkdotcom
Copy link
Author

it's a shame it's not possible to use the existing console api, but direct the output to the desired dev-tool tab :(

@mindplay-dk
Copy link
Contributor

It's not strictly impossible - the source-code is available, but of course would need some major restructuring to extract the parts you'd need.

I was actually somewhat surprised not to find an npm package with the console functions available as a library - there are lots of third-party tools that implement framework-specific consoles, etc. so this would definitely be useful. (I didn't look very hard, so there still might be?)

(if I was going to attack this problem myself, that would be my approach - extract the console API and make it available as a proper package...)

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

No branches or pull requests

2 participants