aboutsummaryrefslogtreecommitdiff
path: root/cmd/generate-config/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/generate-config/main.go')
-rw-r--r--cmd/generate-config/main.go29
1 files changed, 29 insertions, 0 deletions
diff --git a/cmd/generate-config/main.go b/cmd/generate-config/main.go
new file mode 100644
index 00000000..4dd12593
--- /dev/null
+++ b/cmd/generate-config/main.go
@@ -0,0 +1,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))
+}