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

Component info dump at startup #46

Closed
sbellware opened this issue May 17, 2019 · 1 comment
Closed

Component info dump at startup #46

sbellware opened this issue May 17, 2019 · 1 comment
Labels
feature
Milestone

Comments

@sbellware
Copy link
Contributor

@sbellware sbellware commented May 17, 2019

Gather a graph of info about a component, it's consumers, handlers, etc, into a buffer. Output the contents at component startup.

For example:

Starting Component: TaxonomyDataComponent::Start (lib/taxonomy_data_component/start.rb)
Name: (none)

  Starting consumer: TaxonomyDataComponent::Consumers::Taxonomy::Events
  Category: taxonomy
  Identifier: (none)
  Position: 0

    Handler: TaxonomyDataComponent::Handlers::Taxonomy::Events
	Messages: Taxonomize, DataGenerated, Taxonomized

Started Component: TaxonomyDataComponent::Start
ProcessID: 65674

Possibly an implementation of the form:

info = Consumer::Info.get(SomeConsumer)

output = info.to_s
puts output

# Or:
info = Consumer::Info.get(SomeConsumer)
info.dump

# Or:
info.dump(STDOUT)

# Where the signature of dump is:
dump(device=STDOUT)

The same pattern would be represented in lower parts of the stack, from host, to consumers, handlers, and maybe even messages.

Notes

  • Lower the precedence of the position store log output so that it doesn't print before the component dump
  • Make the dump on by default, but able to be deactivated via an environment variable
  • If the info dump is deactivated, set the log level of the component info logs to the highest level. Otherwise, log them at the info or debug level
    • Decision needed on what level to log the info at when the info dump is activated
@sbellware sbellware added the feature label May 17, 2019
@sbellware sbellware added this to the v2 milestone Sep 4, 2019
@sbellware sbellware changed the title Component Info Output Component info dump at startup Sep 7, 2019
@sbellware sbellware modified the milestones: v2, v2+ Nov 19, 2019
@sbellware
Copy link
Contributor Author

@sbellware sbellware commented Apr 9, 2020

Done

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

No branches or pull requests

1 participant