当前位置:网站首页>Technical implementation process of easycvr platform routing log function [code attached]
Technical implementation process of easycvr platform routing log function [code attached]
2022-06-27 23:15:00 【EasyCVR】
EasyCVR Support massive video aggregation management , It can provide live video surveillance 、 Cloud video 、 Cloud storage 、 Video retrieval and review 、 Intelligent alarm 、 Platform cascading 、 Intelligent analysis and other video services . Strong platform compatibility 、 High openness , Powerful data access 、 Processing and distribution capabilities , At present, it has been applied in smart construction sites 、 Smart campus 、 Smart community 、 Intelligent building 、 Smart security, etc .

Recently, we have EasyCVR Added the routing log function , Today, I would like to share with you the implementation process .
In project application , Some users need to record the details of each interface call IP and url Path parameter , So we have EasyCVR The routing log function is added to the platform .


Add the following code , When the routing interface is initialized , Customizable log Log Middleware , Then according to the desired format , Find the required... From the request header ip and url Parameters .

func LoggerWithConfig(conf LoggerConfig) HandlerFunc {
formatter := conf.Formatter
if formatter == nil {
formatter = defaultLogFormatter
}
out := conf.Output
if out == nil {
out = DefaultWriter
}
notlogged := conf.SkipPaths
isTerm := true
if w, ok := out.(*os.File); !ok || os.Getenv("TERM") == "dumb" ||
(!isatty.IsTerminal(w.Fd()) && !isatty.IsCygwinTerminal(w.Fd())) {
isTerm = false
}
Request page interface again , The interface log can be printed normally .


EasyCVR The video fusion cloud platform not only supports multiple types of devices 、 Multi protocol access , It is also flexible in network environment deployment , Support 4G/5G、WiFi、 Broadband and other network access , It can greatly meet users' needs in diversified scenarios . The platform is widely used in offline scenarios , The construction site includes wisdom 、 Smart factory 、 Smart campus 、 Smart community and so on .

meanwhile , We also provide a wealth of API Interface for users to call 、 Integration and secondary development , Recently, we are working on EasyCVR Expand new functions of the platform , Welcome to pay attention to our update .
边栏推荐
- DCC888 :Register Allocation
- Introduction to MySQL operation (IV) -- data sorting (ascending, descending, and multi field sorting)
- 「R」使用ggpolar绘制生存关联网络图
- 消除el-image图片周围间隙
- Follow the archiving tutorial to learn rnaseq analysis (IV): QC method for de analysis using deseq2
- PHP连接数据库实现用户注册登录功能
- 元气森林的5元有矿之死
- 跟着存档教程动手学RNAseq分析(一)
- Spark bug Practice (including bug: classcastexception; connectexception; noclassdeffounderror; runtimeexceptio, etc.)
- Hiplot 在线绘图工具的本地运行/开发库开源
猜你喜欢

Livox Lidar+海康Camera实时生成彩色点云

MySQL十八:写语句的执行过程

Spark bug practice (including bug:classcastexception; connectexception; NoClassDefFoundError; runtimeException, etc.)

医美大刀,砍向00后

【经典干货书】数据科学中的信息理论方法,561页pdf

实践torch.fx:基于Pytorch的模型优化量化神器

Senior headhunting team manager: interviewed 3000 consultants, summarized and organized 8 commonalities (Mao Sheng)

Netease cloud lost its "feelings" card

Vue+mysql login registration case

Spark bug Practice (including bug: classcastexception; connectexception; noclassdeffounderror; runtimeexceptio, etc.)
随机推荐
使用同花顺手机炒股安全吗?
Livox Lidar+海康Camera 基于loam的实时三维重建生成RGB彩色点云
电子科大(申恒涛团队)&京东AI(梅涛团队)提出用于视频问答的结构化双流注意网络,性能SOTA!优于基于双视频表示的方法!
[essay]me53n add button to call URL
Using xgboost with tidymodels
First knowledge of the second bullet of C language
Follow the archiving tutorial to learn rnaseq analysis (IV): QC method for de analysis using deseq2
Using the cucumber automated test framework
批量处理-Excel导入模板1.1-支持多Sheet页
Basic knowledge of loop traversal and function
Vue+MySQL实现登录注册案例
mongodb基础操作之聚合操作、索引优化
mysql操作入门(四)-----数据排序(升序、降序、多字段排序)
99 multiplication table - C language
Process judgment - ternary operation - for loop
最新云开发微信余额充电器特效小程序源码
如何设置企业微信群机器人定时发消息?
Personal tree ALV template - accelerate your development
Livox Lidar+APX15 实时高精度雷达建图复现整理
Feign通过自定义注解实现路径的转义