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.
Prerequisites
Installation
Configuration
Overview
Issues or Suggestions
License
Clients should be registered with the regarding service
Install stable version from NPM:
npm install zglog-adapter --save
zglog-adapter can be used with enoa-client, for more information on how to use enoa-client in your App view the enoa-client.
####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
####Example
//express
express_app.use(client.log());
//normal use
client.log(//parameters)
####Example
client.find({select:['client_ip','headers'], where:{userid:'254'}, time:{from:'2014-04-04T0.00Z', to:'2014-04-04T0.00Z'}}, callback);
####Example returns selected fields
//Note: Chaining will be implemented soon
// e.g. client.select().where().time.range()
client.select(['client_ip','headers'], callback);
####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)
####Example returns values based on the specified time range
client.time({from:'', to:''}, callback)
####Example
//callback is a function with (err, data)
client.messages(optinal_query, callback);
//or
client.fields_return(fields, callback);
- log Messages
- get Messages
- get Terms
- get stats
- get history
- register
- log
- find
- fields_return
- isSpecific_return
- intime_return
- history
As zglog-adapter is just an experimantal adapter for enoa-client, anybody who can build or contribute is welcome.