-
Notifications
You must be signed in to change notification settings - Fork 48
Logging
Rodrigo Fernandez edited this page Jul 21, 2014
·
10 revisions
A simple logging utility is available on both client and server side through LAZO.logger
.
It supports four logging levels: info, warn, error and debug.
// There are 4 log levels: info, warn, error and debug.
logger.info('Lorem ipsum dolor sit amet');
logger.warn('Lorem ipsum dolor sit amet');
logger.error('Lorem ipsum dolor sit amet');
logger.debug('Lorem ipsum dolor sit amet');
Log levels can be changed during runtime.
logger.setLevel('warn');
It accepts more than one argument and printf-style formatting.
logger.debug('Lorem %s dolor %s amet', 'ipsum', 'sit'); // Lorem ipsum dolor sit amet
logger.debug('integer: %d', 3.14159); // integer: 3
logger.debug('integer: %i', 3.14159); // integer: 3
logger.debug('float: %f', 3.14159); // float: 3.14159
logger.debug('json: %j', {foo:123, bar:456}); // json: {"foo":123,"bar":456}
Overview
Life Cycles
Getting Started
Development Tools
Application Structure
application.js
Configuration
Configuration Providers
Logging
Module Loader
Assets
Combo Handling
Components
Models and Collections
Views
Templates
Layouts
Imports
Links
Request Filters
Crumb
Server Setup
Error Templates
Page Template
Server Utilities
Node Modules
Contributing