Latest 0.1
Homepage https://github.com/nerdishbynature/PBLog
License MIT
Authors

This is a simple NSLog() replacement, which can send your logs directly to an HTTP Server and creates a log file.
You can even share the LogFile through iTunes by enabling FileSharingSupport in your Info.plist file (like in the sample provided).

You need to have your own webserver listening to your POST requests.

You can use this sample and add the following statements
to your do_POST() method before self.end_headers() .

logstring = self.headers.getheader('log')           
            print logstring

Or use the webserver I provided.

Feel free to ask any questions and follow me on Twitter @piet_nbn.

Installation

Install via cocoapods:

pod 'PBLog', '~> 0.1'

Or simply drop PBLog. and PBFileLogger. files into your Project.

Documentation

logFile:withLineNumber:andFormat:

        Method used for logging

+ (void)logFile:(char )file withLineNumber:(int)lineNumber andFormat:(NSString )format, …

Parameters

file

        The class from which the log comes

lineNumber

        The line number where the log was sent from

format, …

        The formatted string, which should be logged

sharedInstance

        Is the sharedInstance singleton for loggin into the same file

+ (PBFileLogger )sharedInstance*

Instance Methods

log:

        Method used for loggin

– (void)log:(NSString )format, …*

        Parameters

format, …

        The formatted string supposed to be logged

Latest podspec

{
    "name": "PBLog",
    "version": "0.1",
    "summary": "A small logging engine with support for logging over HTTP using the provided Python Webserver.",
    "homepage": "https://github.com/nerdishbynature/PBLog",
    "license": "MIT",
    "authors": {
        "Piet Brauer": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nerdishbynature/PBLog.git",
        "tag": "0.1"
    },
    "source_files": [
        "",
        "*.{h,m}"
    ],
    "exclude_files": "README.md",
    "requires_arc": false
}

Pin It on Pinterest

Share This