aboutsummaryrefslogtreecommitdiff
path: root/cmd/generate-config/main.go
blob: 4dd125933dd17d5d19763cc615a63411fac43792 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package main

import (
	"fmt"

	"github.com/matrix-org/dendrite/internal/config"
	"gopkg.in/yaml.v2"
)

func main() {
	cfg := &config.Dendrite{}
	cfg.Defaults()
	cfg.Logging = []config.LogrusHook{
		{
			Type:  "file",
			Level: "info",
			Params: map[string]interface{}{
				"path": "/var/log/dendrite",
			},
		},
	}

	j, err := yaml.Marshal(cfg)
	if err != nil {
		panic(err)
	}

	fmt.Println(string(j))
}