Latest 0.1.3
License APACHE
Platforms ios 8.0, requires ARC

Build Status

RemoteLogger is an Objective-C library which helps you to send logs to your HTTPS server.

When we start to develop new application it is always requiring us to send debug messages to a server.
We should deal with the remote logging.
When we collect the debug messages we should always thinking about resource constraints.

Previously we had a bad experience using an UDP transfer.
It’s unbelievable to always have all log messages on a server via UDP transfer,
so we came up with an HTTPS transfer.

Introducing RemoteLogger library.
It firstly saves debug messages to a memory buffer, then stores to a file and then sends them to an HTTPs server.


  • lightweight (no external dependencies)
  • send logs via http/https

Setup with dependency managers


pod 'RemoteLogging', '0.1.0'


pod "BerTlv", :git => '[email protected]:payneteasy/RemoteLogging.git', :tag => '0.1.0'


github "RemoteLogging/BerTlv"  "0.1.0"

How to use it

Please see SampleApp in this project to find out the best way to use the library.

The code below shows principles.

# define DLog(fmt, ...) [RemoteLogging send:__PRETTY_FUNCTION__ line:__LINE__ originalFormat:fmt , ##__VA_ARGS__];

 @interface RemoteLogging : NSObject


 +(void)     send:(const char*) aSender
             line:(int) aLine
   originalFormat:(NSString *)aOriginalFormat
                 , ...


@implementation RemoteLogging

+ (RLHttpRemoteLogger *) sharedInstance {
    static dispatch_once_t      predicate;
    static RLHttpRemoteLogger   * instance;

    dispatch_once(&predicate, ^{
        RLDirectory * directory = [[RLDirectory alloc] initCacheWithName:@"remote-logs"];
        [directory mkDir];

        instance = [[RLHttpRemoteLogger alloc]
                 memoryBufferSize:50  * 1024
                         fileSize:200 * 1024
                    directorySize:10 * 1024 * 1024];
    return instance;

+ (void)incrementSession {
    [[RemoteLogging sharedInstance] mark];

+ (void)send:(const char *)aSender line:(int)aLine originalFormat:(NSString *)aOriginalFormat, ... {
    va_list args;
    NSString *logLine = [[NSString alloc] initWithFormat:aOriginalFormat arguments:args];

    // write to log immediately
    NSLog(@"%@: %@", [NSThread currentThread], logLine);

    NSString *outputText = [self createOutputText:aSender aLine:aLine text:logLine];
    [[RemoteLogging sharedInstance] send:outputText];

+ (NSString *)createOutputText:(char const *)aSender aLine:(int)aLine text:(NSString *)aText {
    NSDateFormatter *dateFormat = [[NSDateFormatter alloc] init];
    [dateFormat setDateFormat:@"YYYY-MM-dd HH:mm:ss.SSS ZZZZZ"];

    // date
    // sender
    // line
    // log line
    NSString *outputText = [NSString stringWithFormat:@"%@ %s,%d - %@n"
            , [dateFormat stringFromDate:[NSDate date]]
            , aSender
            , aLine
            , aText
    return outputText;


Latest podspec

    "name": "RemoteLogger",
    "version": "0.1.3",
    "summary": "Remote Logger for ios",
    "description": "Remote logger for ios.nSend logs to HTTP server.",
    "homepage": "",
    "license": "APACHE",
    "authors": {
        "Evgeniy Sinev": "[email protected]"
    "source": {
        "git": "",
        "tag": "0.1.3"
    "platforms": {
        "ios": "8.0"
    "requires_arc": true,
    "source_files": "RemoteLogger/*",
    "public_header_files": "RemoteLogger/*.h"

Pin It on Pinterest

Share This