mirror of
https://github.com/khorevaa/ras-service.git
synced 2024-11-21 16:46:32 +02:00
Microservice control
RAS
over HTTP/gRPC
.github/workflows | ||
.idea | ||
cmd | ||
service | ||
.gitignore | ||
.goreleaser.yaml | ||
Dockerfile | ||
go.mod | ||
go.sum | ||
goreleaser.bat | ||
goreleaser.sh | ||
install.bat | ||
LICENSE | ||
logos.yaml | ||
main.go | ||
microservice.puml | ||
mm.puml | ||
README.md | ||
uninstall.bat |
ras-service
Microservice control RAS
over HTTP/gRPC
Запуск в докере
docker run -v $(pwd):/tmp/dist ghcr.io/khorevaa/ras-service
Настройка логов
Через файл настройки
Создать рядом с приложением файл logos.yaml
с содержимым
appenders:
console:
- name: CONSOLE
target: stdout
encoder:
console:
rolling_file:
- name: FILE
file_name: ./logs/ras-service.log
max_size: 100
max_age: 10
encoder:
json:
loggers:
root:
level: info
appender_refs:
- CONSOLE
logger:
- name: "github.com/khorevaa/ras-service"
appender_refs:
- CONSOLE
- FILE
level: debug
Через переменные окружения
export LOGOS_CONFIG="appenders.rolling_file.0.name=FILE;
appenders.rolling_file.0.file_name=./logs/ras-service.log;
appenders.rolling_file.0.max_size=100;
appenders.rolling_file.0.encoder.json;
loggers.logger.0.level=debug;
loggers.logger.0.name=github.com/khorevaa/ras-service;
loggers.logger.0.appender_refs.0=CONSOLE;
loggers.logger.0.appender_refs.1=FILE;"