zglog-adapter
zglog-adapter is just for experminetal purposes for enoa-client, you can log the http request, response and get the saved logged messages.
Note
zglog-adapter
is build for enoa-client just for experimental purposes.
Table of Contents
Prerequisites
Installation
Configuration
Overview
Issues or Suggestions
License
Prerequisites
Clients should be registered with the regarding service
Installation
Install stable version from NPM:
npm install zglog-adapter --save
Configuration
zglog-adapter can be used with enoa-client, for more information on how to use enoa-client in your App view the enoa-client.
zglog-adapter configuration
####Example
var config = {
collections:{
zglog:{
host:'192.168.0.1',
adapter:require('zglog-adapter'),
timeout:false,
port:9000,
appId:'app_id',
apiKey:'app_key'
}
}
};
var client = require('enoa-client')(config);
//client is initialized now
Note
method chaining and functions like messages, history etc. will be implemnted soon
zglog-adapter log
####Example
//express
express_app.use(client.log());
//normal use
client.log(//parameters)
zglog-adapter find
####Example
client.find({select:['client_ip','headers'], where:{userid:'254'}, time:{from:'2014-04-04T0.00Z', to:'2014-04-04T0.00Z'}}, callback);
zglog-adapter select
####Example returns selected fields
//Note: Chaining will be implemented soon
// e.g. client.select().where().time.range()
client.select(['client_ip','headers'], callback);
zglog-adapter where
####Example returns values based on the specific condition or value existance
//Note: Chaining will be implemented soon
// e.g. client.select().where().time.range()
client.where(['userid','pid'], callback)
// where useid and pid exists together
client.where([{'userid':12},{'pid':954}], callback)
client.where([{and:[{'userid':12},{'pid':954}]}], callback)
client.where([{or:[{'userid':12},{'pid':954}]}], callback)
zglog-adapter time
####Example returns values based on the specified time range
client.time({from:'', to:''}, callback)
zglog-adapter get messages
####Example
//callback is a function with (err, data)
client.messages(optinal_query, callback);
//or
client.fields_return(fields, callback);
Overview
Features
- log Messages
- get Messages
- get Terms
- get stats
- get history
Methods
- register
- log
- find
- fields_return
- isSpecific_return
- intime_return
- history
Issues or Suggestions
As zglog-adapter is just an experimantal adapter for enoa-client, anybody who can build or contribute is welcome.