1
0
mirror of https://github.com/khorevaa/ras-service.git synced 2024-11-21 16:46:32 +02:00
Microservice control RAS over HTTP/gRPC
Go to file
Aleksey Khorev 267f5d8510 work on
2021-08-12 15:42:34 +03:00
.github/workflows add project struct files 2021-08-12 08:59:02 +03:00
.idea add project struct files 2021-08-12 08:59:02 +03:00
cmd work on 2021-08-12 15:42:34 +03:00
service work on 2021-08-12 15:42:34 +03:00
.gitignore work on 2021-08-12 15:42:34 +03:00
.goreleaser.yaml add project struct files 2021-08-12 08:59:02 +03:00
Dockerfile add project struct files 2021-08-12 08:59:02 +03:00
go.mod work on 2021-08-12 15:42:34 +03:00
go.sum work on 2021-08-12 15:42:34 +03:00
goreleaser.bat add project struct files 2021-08-12 08:59:02 +03:00
goreleaser.sh add project struct files 2021-08-12 08:59:02 +03:00
install.bat work on 2021-08-12 15:42:34 +03:00
LICENSE Initial commit 2021-08-11 21:53:29 +03:00
logos.yaml fix readme, add logos 2021-08-12 09:20:13 +03:00
main.go work on 2021-08-12 15:42:34 +03:00
microservice.puml new work 2021-08-11 22:36:12 +03:00
mm.puml new work 2021-08-11 22:36:12 +03:00
README.md fix readme, add logos 2021-08-12 09:20:13 +03:00
uninstall.bat work on 2021-08-12 15:42:34 +03:00

ras-service

Microservice control RAS over HTTP/gRPC

Release Software License Build status Codecov branch Go Doc SayThanks.io Powered By: GoReleaser Conventional Commits

Запуск в докере

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;"