Commit Graph

11 Commits

Author SHA1 Message Date
deadprogram 9f83eaa7a2 Fix #311 by setting default for tests to 'silent' 2015-09-01 10:18:17 -07:00
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 b1c91b7419 Logger should subscribe to updates, not be told what to do 2015-06-22 19:08:15 -07:00
Andrew Stewart 8adacef282 s/source/lib for loading files for specs 2015-06-09 07:21:03 -07:00
Andrew Stewart 62cbae7cff Switch to ESLint for linting 2015-04-15 08:59:34 -07:00
Andrew Stewart e2bec78de7 Clean up specs for JSHint 2014-12-15 09:37:52 -08:00
Andrew Stewart 7f761c7268 WIP on cleaning up specs 2014-12-14 15:24:49 -08:00
Andrew Stewart 4f850d5e9e Support passing config to Logger#setup again 2014-11-28 09:37:44 -08:00
Andrew Stewart 0f59645fd7 Move Logger configuration into Cylon#config 2014-10-28 15:53:03 -07:00
Andrew Stewart 2cb2fc232d Basic log level implementation 2014-10-27 08:59:36 -07:00
Andrew Stewart bd95f9eb3c Reorganize tests, under 'spec' directory now 2014-10-20 14:55:25 -07:00