Commit Graph

15 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 def91ffe53 Split apart MCP, API manager, exports 2015-06-29 08:25:07 -07:00
Andrew Stewart 8ac8d7de94 Update config to act as subscribable data store 2015-06-22 18:57:34 -07:00
Andrew Stewart 0b48851885 Remove unnecessary comments at start of files 2015-06-22 09:16:43 -07:00
Andrew Stewart cccb376679 Consistent top-of-file doc blocks 2015-04-15 08:59:12 -07:00
Andrew Stewart eccdde81a9 Update copyright years 2015-01-07 12:58:50 -08:00
Andrew Stewart ac6b09fe50 Clean up lib for JSHint 2014-12-15 11:15:29 -08:00
Andrew Stewart 4c539ab9d1 Better configuration for TDR test mode 2014-11-06 09:48:21 -08:00
Andrew Stewart 0f59645fd7 Move Logger configuration into Cylon#config 2014-10-28 15:53:03 -07:00
Andrew Stewart 3b7c96e81e Add user configuration for Cylon internals 2014-09-03 15:08:48 -07:00
Andrew Stewart c4d03428e8 Defer to Utils#fetch for getting ENV state 2014-07-12 11:00:34 -07:00
Andrew Stewart 17a0a5d08f Remove node-namespace from Config 2014-05-13 18:14:36 -07:00
xixebombilla 8644399276 210 comments JS 2014-02-27 16:42:33 -06:00
deadprogram c28baa8eeb Refactor api, basestar & config to pure JS style 2014-02-27 10:58:50 -08:00
deadprogram b27756abfc WIP on pure JS revamp 2014-02-27 06:44:53 -08:00