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

Such as dealing with rocketmq client log problems.

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

This article introduces the relevant knowledge of "such as dealing with rocketmq client log problems". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

Catalogue

Problem handling of rocketmq client Log

Method 1: rocketmq enables slf4j [recommended]

Method 2: change the default rocketmq road strength and level

RocketMQ loads its own logs, as well as features

Problem handling of rocketmq client Log

After using rocketmq, a large number of mq trace logs are generated by default in the {user.home}\ logs\ rocketmqlogs directory. You can disable or change the storage directory in the following ways

Method 1: rocketmq enables slf4j [recommended]

# set system properties

Rocketmq.client.logUseSlf4j=true

Add startup parameters:-Drocketmq.client.logUseSlf4j=true [recommended]

Or start the class to add: System.setProperty ("rocketmq.client.logUseSlf4j", "true")

# logback Log configuration

# Rocketmq apppender configuration

${log.base} / rocketmq.log$ {log.base} /% d {yyyy-MM-dd} / rocketmq-%i.%d {yyyy-MM-dd} .log.gz30MB ${pattern}

# Rocketmq logger configuration

Method 2: change the default rocketmq road strength and level

# set system properties

Rocketmq.client.logRoot= {day-end path} rocketmq.client.logLevel= {log level}

It is recommended to add startup parameters:

-Drocketmq.client.logRoot=/opt/appl/tomcat/logs/ {application name}-Drocketmq.client.logLevel=warnRocketMQ loads the log itself, and the feature RocketMQConfiguration () {System.setProperty ("rocketmq.client.log.loadconfig", "false");}

The scene in which the order is not paid when shopping and is automatically cancelled after a period of time?

If the current time minus 15 minutes, which is greater than the time to place the order, then cancel the order

This is the end of the content of "such as dealing with rocketmq client log problems". Thank you for your reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

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

Development

Wechat

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

12
Report