洛阳学员端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1 KiB

8 months ago
  1. //
  2. // ASSLogger.h
  3. // ae-security-sdk
  4. //
  5. // Created by xingchen on 14/12/22.
  6. // Copyright (c) 2014年 Alipay. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "ASSProtocolCenter.h"
  10. #define ASSLog(...) do { \
  11. if ([ASSProtocolCenter sharedCenter].logDelegate) { \
  12. [[ASSProtocolCenter sharedCenter].logDelegate print:__VA_ARGS__, nil]; \
  13. }} while(0)
  14. #define ASSDtl(params, detail) [[ASSProtocolCenter sharedCenter].logDelegate print:[NSString stringWithFormat:@"%@%@",params,detail], nil]
  15. #define ASSLogError(erroInfo) do { [[ASSLogger sharedInstance] addLogWithMessage: erroInfo]; } while(0)
  16. @interface ASSLogger : NSObject
  17. @property (nonatomic, strong) NSString* loggerInfo;
  18. +(id)sharedInstance;
  19. -(void)initializeWithArgs:(NSDictionary*)inArgs;
  20. -(void)addLogWithMessage:(NSString*)message;
  21. -(void)uploadLog;
  22. //---------for test
  23. -(NSData*)generateMessage:(NSString*)msg;
  24. -(void)addLogWithMessage:(NSString *)message withFileName:(NSString*)fileName;
  25. -(NSString*)getCurrentFileName:(NSDate*)date;
  26. -(void)internal_addLog:(NSString*)message;
  27. -(void)uploadLogCertified;
  28. @end