Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
schbrain-parent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
framework
schbrain-parent
Commits
b44d98e2
Commit
b44d98e2
authored
Mar 11, 2024
by
liaozan
🏀
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update pom.xml
parent
ecf82663
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
6 deletions
+7
-6
pom.xml
pom.xml
+6
-0
starters/kafka-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/kafka/KafkaLoggingProducerListener.java
...ork/autoconfigure/kafka/KafkaLoggingProducerListener.java
+1
-6
No files found.
pom.xml
View file @
b44d98e2
...
...
@@ -740,6 +740,12 @@
</pluginRepositories>
<profiles>
<profile>
<id>
schbrain
</id>
<activation>
<activeByDefault>
true
</activeByDefault>
</activation>
</profile>
<!-- 开发环境 -->
<profile>
<id>
dev
</id>
...
...
starters/kafka-spring-boot-starter/src/main/java/com/schbrain/framework/autoconfigure/kafka/KafkaLoggingProducerListener.java
View file @
b44d98e2
...
...
@@ -12,19 +12,14 @@ import org.springframework.kafka.support.LoggingProducerListener;
@Slf4j
public
class
KafkaLoggingProducerListener
extends
LoggingProducerListener
<
Object
,
Object
>
{
public
KafkaLoggingProducerListener
()
{
this
.
setIncludeContents
(
false
);
}
@Override
public
void
onSuccess
(
ProducerRecord
<
Object
,
Object
>
record
,
RecordMetadata
metadata
)
{
log
.
debug
(
"[{}] 消息发送成功, content: {}"
,
record
.
topic
(),
record
.
value
());
log
.
info
(
"[{}] 消息发送成功, content: {}"
,
record
.
topic
(),
record
.
value
());
}
@Override
public
void
onError
(
ProducerRecord
<
Object
,
Object
>
record
,
RecordMetadata
metadata
,
Exception
exception
)
{
log
.
warn
(
"[{}] 消息发送失败, content: {}"
,
record
.
topic
(),
record
.
value
());
super
.
onError
(
record
,
metadata
,
exception
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment