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

a logging utility #92

Open
2 tasks
kylemac opened this issue Jun 19, 2015 · 6 comments
Open
2 tasks

a logging utility #92

kylemac opened this issue Jun 19, 2015 · 6 comments

Comments

@kylemac
Copy link
Contributor

kylemac commented Jun 19, 2015

i've run into a few different log uses cases and i feel like a simple console.log falls a little short. i'm thinking we implement these logging helpers:

  • utils.log.write - a simple wrapper around console.log but with colored output
  • utils.log.queue - a buffer of logged messages (probably displayed in a list) that logged only after the compilation is complete. think of these like post-install instructions. a use-case i've had is leaving a few different post-install messages like "don't forget to edit the keys in coveralls.yml" and "go to http://magnum.travis-ci.com to obtain your API key".
@nporteschaikin
Copy link
Contributor

@kylemac I may not be thinking straight on this, but utils.log.queue doesn't really work as a Utils instance doesn't really know when a function ends, right?

I like the idea of a logger, though. Maybe with utils.log.success, utils.log.error, and utils.log.message?

@nporteschaikin
Copy link
Contributor

@kylemac ☝️

@kylemac
Copy link
Contributor Author

kylemac commented Jul 13, 2015

major slowness here - apologies.

yeah you're right - because utils is completely detached we can't accomplish the queueing in a good way. it's a "nice to have" feature, but not worth refactoring or marshaling an object across the classes. i do like your proposal for the logging utils though.

@nporteschaikin
Copy link
Contributor

@kylemac Thinking about this again! Do you think we should tie this into the existing emitter?

@kylemac
Copy link
Contributor Author

kylemac commented Sep 21, 2015

i'm sort of on the side of things that thinks it's not worth the effort right meow

@balupton
Copy link

https://github.com/bevry/caterpillar may be of use

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

No branches or pull requests

3 participants