Commit Graph

4 Commits

Author SHA1 Message Date
Andrew Stewart 843e0a3217 Simplify logger
This commit adds a simplified logging system, with two primary methods:

- `Logger#log(String) :: void` (for normal logging)
- `Logger#debug(String) :: void` (for debug logging)

This helps dramatically simplify logging infrastructure, as well as
enabling simpler toggling of log modes.

The configuration values for the Logger have also been updated:

- `logger :: Function` - function to log output to (both normal + debug)
- `silent :: Boolean` - whether to log default normal messages or not (`--silent` flag)
- `debug  :: Boolean` - whether or not to log debug output (`--debug` flag)

Additionally, the following CLI flags are supported re: logging:

- `--silent` disables normal logging (will override all other settings)
- `--debug` enables debug logging

Deprecation notices have been added for old log methods, with first-run
messages to this effect.

This change should have negligible impact on end-users, with minor
inconvenience for library developers, as they need to switch their
logging function calls over.

Logging configuration is still possible via both
`Cylon.Config.update(Object)`, and directly calling
`Cylon.Logger.setup(Object)`.
2015-07-13 14:05:12 -07:00
Andrew Stewart ceac0df8dd Consolidate Robot initialization to a single fn
Additionally, extracts validation of connections being present out to
the validator logic.
2015-06-26 10:31:23 -07:00
Andrew Stewart 10982e4003 Add additional validations 2015-06-17 09:03:26 -07:00
Andrew Stewart 4238385be4 Extract out Robot param validation into new file 2015-06-17 09:03:26 -07:00