This commit does a few things:
- Sets up the ability to log information based off log level
- Figures out where to log the file
- Starts logging information in the program
As this is a first pass the logging is good enough to know where things
went wrong, but we can expand on this in the future to log many many
things. We just now have an initial implementation. The log is written
out to a file that can be read by the user if they pass in -v, -vv, etc.
where each v is an extra level of logging.
This does a few things, remove Cargo.lock from tracking to make sure
when compiled the newest version is used in a fresh repo. Testing on
one's own will require running an 'rm tests/fixtures/*/Cargo.lock' if
wanting to bump to the newest version of wasm-bindgen. This also sets
all tests to use the latest version of wasm-bindgen in 0.2. This shows
that we support that version (0.2.x) but bumping it to 0.3 means we've
opted for that kind of change, but for now it's not been bumped to that.
Remove quicli from the code base. It's a fantastic library to get
started, but in order to implement logging as well as just maintaining
the library in general it was easier to remove it and continue work
without it. While we were going to remove it in 0.4 we found it easier
to remove now to implement logging.
This does two big things:
- We add custom error messages and conversions from other error types
into our own error type. This means we can create or modify more
fine grained errors rather than using whatever `failure::Error` gives
us. The first one we have is a `Cli` error, whereby calls to things
like wasm-bindgen or npm failed.
- We also make it so that `PBAR.error()` is called only on exit. We grab
a reference to whatever error gets passed up the chain, have it
generate a message to be printed as an error to PBAR, close up PBAR
like normal, and then print our actual error message to stderr!
The main benefits of this is that as long as we return an error, PBAR
will print and close itself up and we don't need to call it every time
or forget that we would need to call it, and we put error details
specifically into our error!
Closes#12