refactor: reorganize modules and add Linux build tooling
This commit is contained in:
32
module/finance/wallet/scripts/filebeat.yaml
Normal file
32
module/finance/wallet/scripts/filebeat.yaml
Normal file
@@ -0,0 +1,32 @@
|
||||
filebeat.inputs:
|
||||
- type: log
|
||||
enabled: true
|
||||
# 开启json解析
|
||||
json.keys_under_root: true
|
||||
json.add_error_key: true
|
||||
# 日志文件路径
|
||||
paths:
|
||||
- ./logs/wallet/error.log
|
||||
- ./logs/wallet/slow.log
|
||||
|
||||
setup.template.settings:
|
||||
index.number_of_shards: 1
|
||||
|
||||
# 定义kafka topic field
|
||||
fields:
|
||||
log_topic: scf.wallet.dev
|
||||
|
||||
# 输出到kafka
|
||||
output.kafka:
|
||||
hosts: ["127.0.0.1:9092"]
|
||||
topic: '%{[fields.log_topic]}'
|
||||
partition.round_robin:
|
||||
reachable_only: false
|
||||
required_acks: 1
|
||||
keep_alive: 10s
|
||||
|
||||
# ================================= Processors =================================
|
||||
processors:
|
||||
- decode_json_fields:
|
||||
fields: ['@timestamp','level','content','trace','span','duration']
|
||||
target: ""
|
||||
5
module/finance/wallet/scripts/lint.sh
Normal file
5
module/finance/wallet/scripts/lint.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#install
|
||||
go install github.com/securego/gosec/v2/cmd/gosec@latest
|
||||
|
||||
#run
|
||||
gosec -fmt=json -out=./test/lint/gosec.json ./...
|
||||
Reference in New Issue
Block a user