update log creation file
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@ -4,3 +4,4 @@ database
|
|||||||
bin
|
bin
|
||||||
*.xml
|
*.xml
|
||||||
Makefile
|
Makefile
|
||||||
|
config.toml
|
||||||
|
|||||||
@ -75,7 +75,7 @@ func SetupDI(ctx context.Context, cfgpath string, verbose bool, logAsJSON bool)
|
|||||||
case "stderr":
|
case "stderr":
|
||||||
output = os.Stderr
|
output = os.Stderr
|
||||||
default:
|
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 {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("creating file for logging: %w", err)
|
return nil, fmt.Errorf("creating file for logging: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
62
config.toml
62
config.toml
@ -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"
|
|
||||||
Reference in New Issue
Block a user