console.log()
console.info()
console.warn()
console.error()
Log Wrapper: https://www.paulirish.com/2009/log-a-lightweight-wrapper-for-consolelog/
-
Logdown: https://github.com/caiogondim/logdown.js
- prefix: to seperate module
- markdown support
-
console.message: https://github.com/astoilkov/console.message
- beautifying the console’s output
- Capturing global errors
- Stack traces
- TraceKit: https://github.com/csnover/TraceKit
- use try, catch
- stacktrace.js: http://stacktracejs.com/
- (skip)
- TraceKit: https://github.com/csnover/TraceKit
- You can capture log entries from your application without being physically at the computer (perfect in production)
- You can manage your server-side and client-side logs in the same place, potentially using the same tools
- You can set up alerts (e.g. a Slack notification or SMS if a critical error occurs)
- Where the console isn’t available or is difficult to view (e.g. when using a mobile’s web view) it’s easier to see what’s going on
- Most logging mechanisms allow you to configure a minimum logging level so that you can filter out certain entries
- It will send log entries immediately, which could lead to your server-side component becoming overloaded
great library:
- log4javascript: http://log4javascript.org/
- jquery logger: good for airbrake server
- loglevel: https://github.com/pimterry/loglevel
(The author provides an example in Roll Your Own Batch-Compatible Logger
, see code there.)
- Self-Hosted Server: Errbit
- SaaS Server