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)`.
This commit removes the last current dependency of Cylon, 'async'.
In it's place, simplified versions of the methods used have been added
so lib/utils/helpers.js.
Removes deprecation warnings + support for single-object + array
syntaxes.
The array syntax will likely continue to work due to the `_.each`
abstraction, but since we don't use it anywhere, the requisite specs
have been removed.
e.g.
connections: {
loopback: {
adaptor: "loopback",
devices: {
ping: { driver: "ping", pin: 1 }
}
}
}
In the event of a name collision between the `devices` hash and a nested
device, the nested device will 'win'.