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

Add Standard output and error formatting #99

Merged
merged 1 commit into from
Nov 24, 2015
Merged

Conversation

adamhjk
Copy link
Contributor

@adamhjk adamhjk commented Nov 24, 2015

  • Creates a new output module, that handles colorizing and pretty output
  • Adds the output!, outputln!, and output_format! macros, that work like
    print!, println!, and format!, but use the output module.
  • Adds the LOGKEY constant, for tracking where messages come from within
    bldr.
  • Adds a 'verbose' flag to every command, that adds the file name, line
    number, and column where the output statement was called.
  • Moves our errors into a BldrError struct, which tracks the file, line,
    and column where the error was created.
  • Adds a bldr_error! macro, which takes the renamed "ErrorKind" enum as
    an argument, and creates a new BldrError instead.
  • Prints all errors as if the "verbose" flag was always on - the side
    effect is that all errors (except those driven by the From trait)
    include the file name and line number they were created from.
  • Updates every user-visible print! and println! statement to use
    output! and outputln!
  • Updates every occurence of BldrError to use the bldr_error! macro
    instead

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

* Creates a new output module, that handles colorizing and pretty output
* Adds the output!, outputln!, and output_format! macros, that work like
  print!, println!, and format!, but use the output module.
* Adds the LOGKEY constant, for tracking where messages come from within
  bldr.
* Adds a 'verbose' flag to every command, that adds the file name, line
  number, and column where the output statement was called.
* Moves our errors into a BldrError struct, which tracks the file, line,
  and column where the error was created.
* Adds a bldr_error! macro, which takes the renamed "ErrorKind" enum as
  an argument, and creates a new BldrError instead.
* Prints all errors as if the "verbose" flag was always on - the side
  effect is that all errors (except those driven by the From trait)
  include the file name and line number they were created from.
* Updates every user-visible print! and println! statement to use
  output! and outputln!
* Updates every occurence of BldrError to use the bldr_error! macro
  instead
@adamhjk
Copy link
Contributor Author

adamhjk commented Nov 24, 2015

gif-keyboard-12920191680625744383

@chef-delivery
Copy link
Contributor

This PR has passed 'Verify' and is ready for review and approval!
Use: '@delivery approve' when code review is complete.

@reset
Copy link
Collaborator

reset commented Nov 24, 2015

gif-keyboard-11853803123069944929

@reset
Copy link
Collaborator

reset commented Nov 24, 2015

@delivery approve

chef-delivery added a commit that referenced this pull request Nov 24, 2015
Merged change d5648710-6084-4f8e-9fed-65863eae4a79

From review branch output-awesome into master

Signed-off-by: reset <[email protected]>
@chef-delivery chef-delivery merged commit bf61c07 into master Nov 24, 2015
@chef-delivery
Copy link
Contributor

Change: d5648710-6084-4f8e-9fed-65863eae4a79 approved by: @reset

@chef-delivery chef-delivery deleted the output-awesome branch November 24, 2015 19:22
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

Successfully merging this pull request may close these issues.

3 participants