当前位置:网站首页>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 .
边栏推荐
- SQL Server 2016详细安装教程(附注册码和资源)
- Web Worker介绍及使用案例
- 月薪3万的狗德培训,是不是一门好生意?
- The choice and trade-off between vector recall and literal recall
- Livox lidar+ Haikang camera generates color point cloud in real time
- First knowledge of the second bullet of C language
- 云辅助隐私集合求交(Server-Aided PSI)协议介绍:学习
- What problems should be paid attention to in the serpentine wiring of PCB?
- mysql中一对多关联,获取多表中最新一条数据
- Using xgboost with tidymodels
猜你喜欢
云辅助隐私集合求交(Server-Aided PSI)协议介绍:学习
Azure Kinect DK realizes 3D reconstruction (PC non real time version)
Netease cloud lost its "feelings" card
Character interception triplets of data warehouse: substrb, substr, substring
Spark BUG实践(包含的BUG:ClassCastException;ConnectException;NoClassDefFoundError;RuntimeExceptio等。。。。)
Consumer finance app user insight in the first quarter of 2022 - a total of 44.79 million people
Design of STM32 and rc522 simple bus card system
【微服务】(十六)—— 分布式事务Seata
Livox lidar+ Hikvision camera real-time 3D reconstruction based on loam to generate RGB color point cloud
Advertising is too "wild", Yoshino "surrenders"
随机推荐
[网络]常见的请求方法
Fsnotify interface of go language to monitor file modification
Feign通过自定义注解实现路径的转义
初识C语言 第二弹
ABAP essay - material master data interface enhancement - tab enhancement
Discuz淘宝客网站模板/迪恩淘宝客购物风格商业版模板
MySQL删除表后如何使ID从1开始
[electron] 基础学习
[suggested collection] ABAP essays-excel-4-batch import recommended
Is the dog virtue training with a monthly salary of 30000 a good business?
九九乘法表——C语言
How to participate in openharmony code contribution
【蓝桥杯集训100题】scratch数字计算 蓝桥杯scratch比赛专项预测编程题 集训模拟练习题第16题
[electron] 基础学习
Design of STM32 and rc522 simple bus card system
居家办公竟比去公司上班还累?
[js]var, let, const
mysql中一对多关联,获取多表中最新一条数据
Brief introduction to game phone platform
STM32与RC522简单公交卡系统的设计