当前位置: 首页 > news >正文

想做网站开发兼职企业网站是什么

想做网站开发兼职,企业网站是什么,第二代营销网站,登录免费注册网址1.背景 为在线教育部提供高效、安全、易用的日志组件。 2.功能介绍 2.1 日志格式化 目前输出的日志格式如下: 日志级别/[YYYY-MM-DD HH:MM:SS MS] TinyLog-Tag: |线程| 代码文件名:行数|函数名|日志输出内容触发flush到文件的时机: 每15分钟定时触发…

1.背景

为在线教育部提供高效、安全、易用的日志组件。

2.功能介绍

2.1 日志格式化

目前输出的日志格式如下:

日志级别/[YYYY-MM-DD HH:MM:SS MS] TinyLog-Tag: |线程| 代码文件名:行数|函数名|日志输出内容
  • 触发flush到文件的时机:

    1. 每15分钟定时触发;
    2. mmap buffer满时触发。
  • 日志清理时机:
    组件init时,会自动清理过期日志,目前默认保留7天日志。

2.2 支持压缩加密

日志组件可通过接口设置是否压缩以及加密。

  • 压缩模式为:zlib默认压缩模式;
  • 加密模式为:RSA+AES流式加密。
2.3 支持日志上传和打包

调用日志上传和打包接口时,日志组件会根据传入参数时间将所需文件按照统一格式进行压缩打包。

2.4 支持FancyLog

在相应场景调用FancyLog接口,日志上传到后台后,可查看根据调用顺序绘制出来的流程图。

2.5 支持日志脱敏

可支持以下数据的脱敏:

  • 大陆手机号
  • 18位身份证号
  • 邮箱号
  • 自定义替换关键词:正则表达式、$(###)和${###}

$(###) 和${###} 区别是,前者为非贪婪匹配,后者为贪婪匹配,示例如下:

SensitiveConvertor *convertor = [[SensitiveConvertor alloc] initReplacerWithPattern:@"我不是$(###),"];
NSString *convertString = [convertor replace:@"我不是潘金莲,我是李雪莲,"];
//output: 我不是******,我是李雪莲,
SensitiveConvertor *convertor = [[SensitiveConvertor alloc] initReplacerWithPattern:@"我不是${###},"];
NSString *convertString = [convertor replace:@"我不是潘金莲,我是李雪莲,接下来"];
//output: 我不是******,接下来

3.使用说明

3.1 日志接口

组件内已经预定义好了一些宏,可以直接使用:

  • 接口列表
#pragma mark -- TinyLog
#define TinyLogVerbose(TAG, fmt, ...)
#define TinyLogInfo(TAG, fmt, ...)
#define TinyLogDebug(TAG, fmt, ...)
#define TinyLogWarning(TAG, fmt, ...)
#define TinyLogError(TAG, fmt, ...)#pragma mark -- TLog
#define TLogVerbose(fmt, ...)
#define TLogInfo(fmt, ...)
#define TLogDebug(fmt, ...)
#define TLogWarning(fmt, ...)
#define TLogError(fmt, ...)
  • 使用示例:
TinyLogInfo(@"ABCmouse", @"This is a test msg (%@) With A TAG.", @"test111");
TLogInfo(@"This is a test msg (%@) without A TAG.", @"test222");
3.2 参数设置接口
  • 接口列表
#pragma mark 参数设置接口
// 是否打开控制台,类型为bool。默认关闭
- (void)enableLogConsole:(BOOL)enable;
// 是否压缩,类型为bool。默认压缩
- (void)enableLogCompress:(BOOL)enable;
// 是否加密,类型为bool。默认加密
- (void)enableLogEncrypt:(BOOL)enable;
// 单个日志文件大小限制,类型为int。单位为MB。默认为-1,不限制
- (void)setLogSingleSizeLimit:(int)logSingleSizeLimit;
// 设置日志级别
- (void)setLogLevel:(TLogPriority)logPriority;
  • 使用示例:
[[TinyLog shareInstance] enableLogConsole:YES];
// 其他接口调用方式类似,根据接口说明传入参数调用即可。
3.3 初始化接口
#pragma mark 初始化接口
// TinyLog初始化接口
- (void)setAppkey:(NSString *)appkey;
// 设置用户ID
- (void)setIdentifyID:(NSString *)identifyID;
// !!!必须设置,不然无法上传日志
- (void)setTinyChannel:(id<ITinyChannel>)tinyChannel;
3.4 日志上传及打包接口
#pragma mark 日志上传接口
//上报区间内的
- (void)uploadFileBegin:(long long)beginTime end:(long long)endTime;
// 上报 指定某一天的
- (void)uploadFileDate:(NSDate *)date;
// 上报 前 hours 小时的
- (void)uploadFileHous:(NSInteger)hours;#pragma mark 日志打包接口
//上报区间内的
- (NSString *)getFileBegin:(long long)beginTime end:(long long)endTime;
// 上报 指定某一天的
- (NSString *)getFileDate:(NSDate *)date;
// 上报 前 hours 小时的
- (NSString *)getFileHous:(NSInteger)hours;
3.5 记录crash日志接口
#pragma mark 记录crash日志接口
- (void)setCrashLogWithID:(int)crashID crashContent:(NSString *)crashContent;
3.6 tinylog内部错误打印接口
#pragma mark tinylog内部错误打印接口
+ (void)setLogExceptionReporter:(id <LogExceptionReporterDelegate>)exceptionReporter;
+ (id <LogExceptionReporterDelegate>)getLogger;

调用示例:

@interface YourClass ()<LogExceptionReporterDelegate>
// ...
@end@implementation YourClass- (void)YourMethod {
// ...[TinyLog setLogExceptionReporter:self];
// ...
}- (void)exceptionReporter:(int)errCode ErrMsg:(NSString *)errMsg {NSLog(@"%d(%@)", errCode, errMsg);// TODO
}- (void)onCrashNotify:(int)crashID {NSLog(@"onCrashNotify(%d)", crashID);
}
3.6 FancyLog接口
  • 接口列表
/*场景相关*/
+ (void)loadScene:(NSString *)sceneName;
+ (void)loadSceneSuccess:(NSString *)sceneName;
+ (void)loadSceneFailed:(NSString *)sceneName;/*操作相关*/
+ (void)swithBack:(NSString *)msg;
+ (void)switchFront:(NSString *)msg;
+ (void)click:(NSString *)msg;/*出现异常*/
+ (void)exception:(NSException *)exception Msg:(NSString *)msg;
+ (void)crash:(NSException *)exception Msg:(NSString *)msg;/*过程*/
+ (void)processStart:(NSString *)msg;
+ (void)processing:(NSString *)msg;
+ (void)processEnd:(NSString *)msg;/*自定义事件*/
+ (void)event:(NSString *)event;
  • 调用示例
// ...
// 根据实际场景调用接口
[FancyLog loadScene:@"This is A Test Secene"];
// ...
3.7 日志脱敏接口
  • 接口列表
#pragma mark -- 转换接口
/// 日志脱敏配置接口1
/// @param converPhone 是否需要对手机号进行脱敏,YES:需要,NO:不需要
/// @param convertIDCard 是否需要对身份证号进行脱敏,YES:需要,NO:不需要
/// @param convertEmail 是否需要对邮箱号进行脱敏,YES:需要,NO:不需要
/// @param customPattern 自定义关键字,支持正则、$(###)、${###}
- (id)initWithConvertPhone:(BOOL)converPhone ConvertIDCard:(BOOL)convertIDCard ConvertEmail:(BOOL)convertEmail CustomPattern:(NSString *)customPattern;/// 转换接口
/// @param originString 待脱敏的字符串
/// @return 脱敏后的字符串
- (NSString *)convert:(NSString *)originString;#pragma mark -- 替换接口
/// 日志脱敏配置接口2
/// @param pattern 自定义关键字,支持正则、$(###)、${###}
- (id)initReplacerWithPattern:(NSString *)pattern;/// 替换接口
/// @param originString 待脱敏的字符串
/// @return 脱敏后的字符串
- (NSString *)replace:(NSString *)originString;
  • 调用示例
SensitiveConvertor *convertor1 = [[SensitiveConvertor alloc] initWithConvertPhone:YES ConvertIDCard:YES ConvertEmail:YES CustomPattern:@"我不是${###},"];NSString *convertString1 = [convertor1 convert:@"我的手机号是18011112222,身份证号是110101199001011234,邮箱号是tinylog@qq.com,我不是潘金莲,我是李雪莲,接下来"];SensitiveConvertor *convertor2 = [[SensitiveConvertor alloc] initReplacerWithPattern:@"我不是$(###),"];
NSString *convertString2 = [convertor2 replace:@"我不是潘金莲,我是李雪莲,"];

4.其他

4.1 日志文件解密

  • 在线解密
    调用上传接口后,日志会上传到http://tiny.edu.woa.com/log

    • 点击下载按钮,可下载解密解压后的日志文件
    • 点击在线查看按钮,可在线查看解密解压后的日志内容
      在这里插入图片描述
  • 本地解密
    调用打包接口后,根据返回的文件路径,使用本地解密工具解密,具体使用方法可参考Tinylog本地解密工具

4.2 Crash场景处理

如果希望能将Crash堆栈也写进日志文件里,可在崩溃监听回调函数中调用TinyLog的写日志接口,以RQD的崩溃监听回调函数为例:

int app_crash_handler_callback() {// ...// 获取sdk生成的crash.logNSString *crashLog = [[CrashReporter sharedInstance] getCrashLog];TLogError(@"crash log:%@", crashLog);// 或者调用 [[TinyLog shareInstance] setCrashLogWithID:_crashID crashContent:crashLog];return 0;
}// ...
[[CrashReporter sharedInstance] setUserCrashHandlerCallback:app_crash_handler_callback];

文章转载自:
http://pinnatilobed.bpcf.cn
http://subrent.bpcf.cn
http://morillo.bpcf.cn
http://homily.bpcf.cn
http://evangel.bpcf.cn
http://laden.bpcf.cn
http://truthlessness.bpcf.cn
http://unlessoned.bpcf.cn
http://postulant.bpcf.cn
http://reapportion.bpcf.cn
http://minisub.bpcf.cn
http://stalag.bpcf.cn
http://forsooth.bpcf.cn
http://interdependence.bpcf.cn
http://unintelligibly.bpcf.cn
http://ghazi.bpcf.cn
http://rebus.bpcf.cn
http://causalgia.bpcf.cn
http://tripalmitin.bpcf.cn
http://refuse.bpcf.cn
http://medulloblastoma.bpcf.cn
http://winged.bpcf.cn
http://phagosome.bpcf.cn
http://waggon.bpcf.cn
http://thitherwards.bpcf.cn
http://blastomycetous.bpcf.cn
http://braggadocio.bpcf.cn
http://apocarp.bpcf.cn
http://galvanometric.bpcf.cn
http://sociogeny.bpcf.cn
http://pericynthion.bpcf.cn
http://varec.bpcf.cn
http://putridly.bpcf.cn
http://goaf.bpcf.cn
http://coloring.bpcf.cn
http://ronggeng.bpcf.cn
http://heraklid.bpcf.cn
http://coupler.bpcf.cn
http://rencontre.bpcf.cn
http://keramics.bpcf.cn
http://nuyorican.bpcf.cn
http://madding.bpcf.cn
http://occupier.bpcf.cn
http://aden.bpcf.cn
http://scoffingly.bpcf.cn
http://parnassian.bpcf.cn
http://hemimorphite.bpcf.cn
http://gamogenesis.bpcf.cn
http://tidy.bpcf.cn
http://profanation.bpcf.cn
http://adenitis.bpcf.cn
http://fervidor.bpcf.cn
http://thematic.bpcf.cn
http://helicopt.bpcf.cn
http://subcentral.bpcf.cn
http://cribbing.bpcf.cn
http://delicately.bpcf.cn
http://gymnasia.bpcf.cn
http://invited.bpcf.cn
http://whiz.bpcf.cn
http://geosynchronous.bpcf.cn
http://evenhanded.bpcf.cn
http://eschatological.bpcf.cn
http://auctioneer.bpcf.cn
http://genuinely.bpcf.cn
http://slinger.bpcf.cn
http://reallocate.bpcf.cn
http://upswept.bpcf.cn
http://pachysandra.bpcf.cn
http://heortology.bpcf.cn
http://clericalize.bpcf.cn
http://sparrowgrass.bpcf.cn
http://xylophilous.bpcf.cn
http://watermelon.bpcf.cn
http://gastraea.bpcf.cn
http://bestow.bpcf.cn
http://hogweed.bpcf.cn
http://twangle.bpcf.cn
http://multiwall.bpcf.cn
http://pentahedral.bpcf.cn
http://monoestrous.bpcf.cn
http://aluminite.bpcf.cn
http://logothete.bpcf.cn
http://counterpull.bpcf.cn
http://trioecious.bpcf.cn
http://ataxia.bpcf.cn
http://dramatist.bpcf.cn
http://winehouse.bpcf.cn
http://supracrustal.bpcf.cn
http://xanthomelanous.bpcf.cn
http://nankeen.bpcf.cn
http://etiolate.bpcf.cn
http://microcurie.bpcf.cn
http://unmetrical.bpcf.cn
http://elder.bpcf.cn
http://chalcogenide.bpcf.cn
http://unbelievably.bpcf.cn
http://hippophobia.bpcf.cn
http://neolith.bpcf.cn
http://unalterable.bpcf.cn
http://www.15wanjia.com/news/80250.html

相关文章:

  • 销售网站建设公司比较好的网站建设网站
  • 都江堰建设局网站在线营销推广
  • 德清建设银行网站网页制作用什么软件做
  • 博物馆门户网站建设方案百度热搜榜今日头条排名
  • 网站的竞品分析怎么做seo服务哪家好
  • 湖南建设人力资源网是正规网站吗常州seo排名收费
  • 做网站的公司 设计好排名seo公司哪家好
  • 做网站在哪里可以找到高清壁纸上海公司网站seo
  • 小说在线阅读网站怎么做注册域名后怎么建网站
  • 上海短视频seo优化网站天津做网站的网络公司
  • 网站支付按钮怎么做快速建站哪个平台好
  • 网站建设赚钱吗最好的bt磁力搜索引擎
  • 免费的外贸销售平台有哪些优化课程体系
  • 张掖网站建设培训班最有吸引力的营销模式
  • 能发朋友圈的网站建设语百度权重排名查询
  • 阜阳网站建设b8bx今日头条新闻推荐
  • 代理ip提取网站源码微信管理系统平台
  • wordpress打开有背景音乐aso优化分析
  • 网络应用开发工程师兰州快速seo整站优化招商
  • 视频拍摄方法有哪些成都最好的seo外包
  • 建设网站服务游戏推广员好做吗
  • 武隆专业网站建设公司跨境电商培训机构哪个靠谱
  • 旅游网站建设目标意义株洲专业seo优化
  • 建设银行深圳天健世纪支行网站网络营销的特点有几个
  • 做时时彩网站代理费用线上销售的方法和技巧
  • 极速网站建设定制多少钱国外免费网站服务器
  • 亿码酷网站建设西安网站设计公司
  • 四川省人民政府文史研究馆seo推广计划
  • 公司网站开发主要技术品牌推广方案怎么写
  • 定制开发电商网站建设哪家好市场推广渠道有哪些