Get the App
SLTechnology News&Howtos  ›  Development  › 

Such as dealing with rocketmq client log problems.

Shulou Source: shulou.com Published: 2022-06-03 04:36:51 10月04日 Update

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!

Tags: Logs methods problems processing time catalogs orders recommendations configurations contents parameters properties more features knowledge systems levels practicality achievements and then Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS NVidia vpn Shulou Technology Xiaomi