Giter Site home page Giter Site logo

fink-erlang's Introduction

Fink

Fink is an Erlang client for https://crashdump.io. Supports integration with different logging and web frameworks.

Supported frameworks

  • SASL (error_handler)
  • Lager
  • N2O
  • Chicago Boss
  • Nitrogen
  • YAWS

Getting started

>fink:add_sasl_backend().
>error_logger:error_msg("HELP").
>fink:add_lager_backend().
>lager:error("BOOM").

N2O integration module requires an additional compilation flag

erlc -Dfink_n2o

or

Add into a rebar.config file

  {erl_opts, [{d, fink_n2o}]}.
>application:set_env(n2o, erroring, n2o_fink).
>try lists:map(1, 0) catch E:R -> wf:error_page(E,R) end.

Use lager example

Use SASL example

Use SASL example

>fink:fcatch(fun() -> 1/0 end).
% or
>fink:push("help, there is a bug!").

Example

https://github.com/crashdumpio/fink-erlang/tree/master/example

Requirements

Erlang 17+

Installation

Add to rebar.config file into deps list and run rebar get-deps in terminal

{fink, ".*", {git, "git://github.com/crashdumpio/fink-erlang.git", "HEAD"}}

Configuration

Fink default settings

[
 {level, info},
 {retry_interval, 5},
 {retry_times, 5},
 {protocol, http},
 {public_key, undefined},
 {secret_key, undefined},
 {project, undefined},
 {port, 31338}
]

To configure fink client you should add to app.config in release directory

Configure sys.config

{fink, [{level, info},
        {retry_interval, 5},
        {retry_times, 5},
        {protocol, https},
        {public_key, "public_key"},
        {secret_key, "secret_key"},
        {project, "project_name"}]}

or configure it using application:get_env/2,3

>application:load(fink),
>application:set_env(fink, project, "project_name"),
>application:load(start).

Find more at examples page (https://github.com/crashdumpio/fink-erlang/tree/master/example) and our blog (http://blog.crashdump.io)

fink-erlang's People

Watchers

 avatar  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.