GithubHelp home page GithubHelp logo

jacksonh / le_ios Goto Github PK

View Code? Open in Web Editor NEW

This project forked from logentriescommunity/le_ios

0.0 0.0 0.0 142 KB

Logentries logger for iOS

License: BSD 2-Clause "Simplified" License

Ruby 1.41% Objective-C 96.65% C++ 1.05% C 0.89%

le_ios's Introduction

Logentries logging for iOS

Main features

  • online/offline logging
  • dictionary serialization
  • secure TLS connection
  • thread safety
  • application lifecycle logging
  • application crash logging with stack traces

Installation

Just add files from lelib group into your project.

Need a token? Get a free account if you don't already have one.

Simple example

#import "lelib.h"

LELog* log = [LELog sharedInstance];
log.token = @"LOGENTRIES_TOKEN";

[log log:@"Hello World"];

Early initialization

The library automatically hooks up to the exception handler and logs unhandled exceptions. This means that you should initialize the library as soon as possible to log all exceptions. Insert following lines to main.m to log exceptions even before application:didFinishLaunchingWithOptions: is invoked.

#import "lecore.h"

int main(int argc, char * argv[])
{
  @autoreleasepool {

    le_init();
    le_set_token("LOGENTRIES_TOKEN");

    return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
  }
}

The token is stored in global variable. You do not have to setup token property
of LELog instance later.

Disable Console Logger

To disable the logger from logging to the console set LE_DEBUG_LOGS to 0 in lelib.h.

Quick questions

Any dependencies? No dependencies. The library uses standard Obj-C and POSIX C.

How to log an event? Simply call [log log:@"Hello world"];

No network coverage? Log entries are stored in a file and sent to Logentries when the network is back.

When app crashes? If configured, the library logs information about the application crash with stack trace.

When app is forced to shut down by OS? There is no way to log it.

le_ios's People

Contributors

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