Giter Site home page Giter Site logo

zglog-adapter's Introduction

zglog-adapter

Version Build Status
ISSUES FORKS STARS Downloads
License

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
> **Note** > > advance functions will be included after a while, this will give you the overview for >[enoa-client](https://github.com/Emallates/enoa-client) adapters and the functions related to the specific service. > >

Issues or Suggestions

As zglog-adapter is just an experimantal adapter for enoa-client, anybody who can build or contribute is welcome.

License

MIT

zglog-adapter's People

Contributors

nomi-ramzan avatar zeeshanalisyed avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.