Skip to content

Instantly share code, notes, and snippets.

@reeonce
Created March 4, 2015 07:19
Show Gist options
  • Select an option

  • Save reeonce/c13720290b8e15ea6175 to your computer and use it in GitHub Desktop.

Select an option

Save reeonce/c13720290b8e15ea6175 to your computer and use it in GitHub Desktop.
share XCGLogger with Objective-C
//
// Logger.h
// banlv
//
// Created by Reeonce Zeng on 3/4/15.
// Copyright (c) 2015 Shen Zhen JIMI Data Technology Co.,Ltd. All rights reserved.
//
#ifndef banlv_ObjcLogger_h
#define banlv_ObjcLogger_h
#define logVerbose(fmt, ...) [[Util logger] verbose:[NSString stringWithFormat: fmt, ##__VA_ARGS__] functionName: [NSString stringWithUTF8String: __PRETTY_FUNCTION__] fileName: @__FILE__ lineNumber: __LINE__ ];
#define logDebug(fmt, ...) [[Util logger] debug:[NSString stringWithFormat: fmt, ##__VA_ARGS__] functionName: [NSString stringWithUTF8String: __PRETTY_FUNCTION__] fileName: @__FILE__ lineNumber: __LINE__ ];
#define logInfo(fmt, ...) [[Util logger] info:[NSString stringWithFormat: fmt, ##__VA_ARGS__] functionName: [NSString stringWithUTF8String: __PRETTY_FUNCTION__] fileName: @__FILE__ lineNumber: __LINE__ ];
#define logWarning(fmt, ...) [[Util logger] warning:[NSString stringWithFormat: fmt, ##__VA_ARGS__] functionName: [NSString stringWithUTF8String: __PRETTY_FUNCTION__] fileName: @__FILE__ lineNumber: __LINE__ ];
#define logError(fmt, ...) [[Util logger] error:[NSString stringWithFormat: fmt, ##__VA_ARGS__] functionName: [NSString stringWithUTF8String: __PRETTY_FUNCTION__] fileName: @__FILE__ lineNumber: __LINE__ ];
#define logSevere(fmt, ...) [[Util logger] severe:[NSString stringWithFormat: fmt, ##__VA_ARGS__] functionName: [NSString stringWithUTF8String: __PRETTY_FUNCTION__] fileName: @__FILE__ lineNumber: __LINE__ ];
#endif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment