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

Logging #50

Open
theofidry opened this issue May 1, 2018 · 3 comments
Open

Logging #50

theofidry opened this issue May 1, 2018 · 3 comments

Comments

@theofidry
Copy link

theofidry commented May 1, 2018

It's worth mentioning I'm mostly using parallelMap rather than parallel directly and this may be purely a doc issue.

My main "complain" and by that I mean pain to check, monitor or debug what's going on when using Amp is that there is absolutely nothing to see. I see a list of workers with their CPU usages, and that's it. There is no logs about how many workers, which command is used to start them, what is their workload or status.

Did I miss something or this is completely missing? If so it would be really interesting to investigate how this could be done. I really like for example how XdebugHandler does it: just plug your logger there and you have everything you need

@kelunik
Copy link
Member

kelunik commented May 4, 2018

@theofidry Logging is currently left to the user. We have some support for logging in amphp/cluster, which is still in an rather early phase.

Do you want logging from the child to the parent or logging within amphp/parallel to see what's going on in the library itself?

@theofidry
Copy link
Author

theofidry commented May 4, 2018

On top of my head a non exhaustive thing I wish I could see:

  • how many workers are used
  • the command used for the workers
  • whether it's thread based or process based workers
  • the workload status, maybe each (or periodically) when the runner is polling the status of the workers

So mostly stuff from the parent although this includes the status about the children

@theofidry
Copy link
Author

A random thought about this: how about making use of a logger class? I mean the basic PSR3 one which would allow the users to pass their own logger with whatever verbosity they wish. The logger could be made optional and make use of the NullLogger when none is passed. WDYT?

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

No branches or pull requests

2 participants