debezium日志目录
时间: 2023-06-29 11:19:29 浏览: 185
Debezium的日志目录取决于你如何部署Debezium。如果你在单台机器上运行Debezium,则日志文件通常会在该机器上的文件系统中的特定目录中生成。如果你将Debezium部署在Kubernetes中,则可以使用Kubernetes日志记录机制来获取Debezium的日志。
在单台机器上运行Debezium时,Debezium的默认日志目录是`/var/log/debezium`。该目录包含Debezium引擎的日志文件,包括Debezium Connector的日志、Debezium Engine的日志和Debezium Server的日志。你可以在Debezium的配置文件中指定日志目录,例如:
```
{
"name": "inventory-connector",
"config": {
"connector.class": "io.debezium.connector.mysql.MySqlConnector",
"database.hostname": "localhost",
"database.port": "3306",
"database.user": "debezium",
"database.password": "dbz",
"database.server.id": "184054",
"database.server.name": "dbserver1",
"database.whitelist": "inventory",
"database.history.kafka.bootstrap.servers": "kafka:9092",
"database.history.kafka.topic": "dbhistory.inventory"
"offset.storage.file.filename": "/var/log/debezium/inventory-connector-offset.dat",
"offset.flush.interval.ms": "60000",
"key.converter": "org.apache.kafka.connect.json.JsonConverter",
"value.converter": "org.apache.kafka.connect.json.JsonConverter",
"key.converter.schemas.enable": "false",
"value.converter.schemas.enable": "false",
"internal.key.converter": "org.apache.kafka.connect.json.JsonConverter",
"internal.value.converter": "org.apache.kafka.connect.json.JsonConverter",
"internal.key.converter.schemas.enable": "false",
"internal.value.converter.schemas.enable": "false",
"transforms": "unwrap",
"transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState",
"transforms.unwrap.drop.tombstones": "false",
"transforms.unwrap.delete.handling.mode": "drop",
"transforms.unwrap.operation.header": "true",
"transforms.unwrap.add.source.fields": "db,table"
}
}
```
在这个例子中,`offset.storage.file.filename`参数指定了Debezium Connector的偏移量存储位置,同时也是Debezium Connector的日志目录。
阅读全文