Project

fyipe

0.0
The project is in a healthy, maintained state
Fyipe is a ruby package that tracks error event and send logs from your applications to your fyipe dashboard.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
 Dependencies

Development

~> 2.5
~> 2.18
~> 3.6
~> 0.60

Runtime

 Project Readme

Fyipe SDK

A fyipe sdk for application logger that can be used to send logs about your applications created on your fypie dashboard which can also used for error tracking

Installation

Gem Install

Via Gem

 gem install fyipe

Basic Usage for Logging

require 'fyipe'

# constructor
logger = FyipeLogger.new(
    'API_URL', # https://fyipe.com/api
    'APPLICATION_LOG_ID',
    'APPLICATION_LOG_KEY'
)


# Sending a string log to the server
item = 'This is a simple log'

response = logger.log(item)

# response after logging a request
puts response


# Sending an object log to the server
item = {
    "name" => "Tony Lewinsky",
    "location" => "Liverpool"
}

response = logger.log(item)
# response after logging a request
puts response

# alternatively, tags can be added to the logged item.
item = 'This is a simple log'
# using a tag string
tag = 'server-side-error'
response = logger.log(item, tag)
# response after logging a request
puts response

# Using an array of strings
tags = ['error', 'server']
response = logger.log(item, tags)
# response after logging a request
puts response

API Documentation

Main API to send logs to the server.

Author: HackerBay, Inc.

  • Fyipe SDK
    • Installation
      • Gem Install
    • Basic Usage for Logging
    • API Documentation
      • FyipeLogger.new(apiUrl, applicationId, applicationKey)
        • logger.log(log, \tags)
        • logger.warning(warning, \tags)
        • logger.error(error, \tags)
    • Contribution

FyipeLogger.new(apiUrl, applicationId, applicationKey)

Create a constructor from the class, which will be used to send logs to the server.

Kind: Constructor Returns: null

Param Type Description
\apiUrl string The Server URL.
\applicationId string The Application Log ID.
\applicationKey string The Application Log Key.

logger.log(log, \tags)

Logs a request of type info to the server.

Kind: method of FyipeLogger.new Returns: Object - An object response of a success or failure.

Param Type Description
\log string | Object The content to the logged on the server.
\tags string | Array The tag(s) to be attached to the logged item on the server.

logger.warning(warning, \tags)

Logs a request of type warning to the server.

Kind: method of FyipeLogger.new Returns: Object - An object response of a success or failure.

Param Type Description
\warning string | Object The content to the logged on the server.
\tags string | Array The tag(s) to be attached to the logged item on the server.

logger.error(error, \tags)

Logs a request of type error to the server.

Kind: method of FyipeLogger.new Returns: Object - An object response of a success or failure.

Param Type Description
\error string | Object The content to the logged on the server.
\tags string | Array The tag(s) to be attached to the logged item on the server.

Contribution

  • Clone repository
  • run cd ruby-sdk/fyipe
  • run bundle install to install dependencies
  • run bundle exec rspec to run tests