Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize weed3-6. Monitor all execution

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces "how to implement weed3-6. Monitor all execution". In the daily operation, I believe that many people are in how to implement weed3-6. There are doubts about the problem of monitoring all execution. The editor has consulted all kinds of data and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the question of "how to implement weed3-6. Monitor all execution"! Next, please follow the editor to study!

Weed3 a mini ORM framework (only 0.1Mb)

Source code: https://github.com/noear/weed3 source code: https://gitee.com/noear/weed3

Some listening interfaces are opened through WeedConfig.

For example: abnormal listening, slow SQL snooping

/ / listen for exceptions to print or record WeedConfig.onException ((cmd, ex)-> {if (cmd.text.indexOf ("a_log"))

< 0 && cmd.isLog >

= 0) {System.out.println (cmd.text);}}); / / monitor SQL performance to uniformly record WeedConfig.onExecuteAft ((cmd)-> {if (cmd.timespan () > 1000) {/ / execute more than 1000 milliseconds.. System.out.println (cmd.text + ":" + cmd.timespan () + "ms");}}); specific listenable event / / exception event WeedConfig.onException (Act2 listener); / / log event (can record command information) WeedConfig.onLog (Act1 listener); / / pre-execution event WeedConfig.onExecuteBef (Fun1 listener); / / executing event (can be monitored, Statement) WeedConfig.onExecuteStm (Act2 listener) / / Post-execution event WeedConfig.onExecuteAft (Act1 listener); so far, about "how to implement weed3-6." The study of "monitoring all execution" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report