update log creation file

This commit is contained in:
Aleksandr Trushkin
2024-02-26 17:55:44 +03:00
parent e09acf6bdb
commit cc4bf675b8
3 changed files with 2 additions and 63 deletions

1
.gitignore vendored
View File

@ -4,3 +4,4 @@ database
bin
*.xml
Makefile
config.toml

View File

@ -75,7 +75,7 @@ func SetupDI(ctx context.Context, cfgpath string, verbose bool, logAsJSON bool)
case "stderr":
output = os.Stderr
default:
outfile, err = os.Create(cfg.Log.Output)
outfile, err = os.OpenFile(cfg.Log.Output, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0666)
if err != nil {
return nil, fmt.Errorf("creating file for logging: %w", err)
}

View File

@ -1,62 +0,0 @@
[badger]
debug = false
dir = "database/"
[log]
level = "info"
format = "json"
output = "stdout"
[eway]
login = "leci@yandex.ru"
password = "2a136e113854cc5d46b868919a7d6e939156ccb55ff12e87861513f7767af98be79e62407410"
_session_id = "19b98ed56cc144f47e040e68dbcd8481"
_session_user = "1490"
owner_id = "26476"
debug = false
workers_pool = 3
# Matcher patterns to detect length / width / height
[dimension_matcher]
case_sensitive = true
[[dimension_matcher.length]]
value = "Длина"
type = "pattern"
[[dimension_matcher.length]]
value = "Общ. длина"
type = "pattern"
[[dimension_matcher.length]]
value = "Длина/*"
type = "pattern"
[[dimension_matcher.length]]
value = "Длина (*"
type = "pattern"
[[dimension_matcher.width]]
value = "Ширина"
type = "pattern"
[[dimension_matcher.width]]
value = "Ширина/*"
type = "pattern"
[[dimension_matcher.width]]
value = "Ширина (*"
type = "pattern"
[[dimension_matcher.heigth]]
value = "Высота"
type = "pattern"
[[dimension_matcher.heigth]]
value = "Высота/*"
type = "pattern"
[[dimension_matcher.heigth]]
value = "Высота (*"
type = "pattern"