OSDN Git Service

log into file (#357)
[bytom/vapor.git] / config / config.go
index 8b5ede8..02d2c7c 100644 (file)
@@ -134,6 +134,7 @@ func DefaultBaseConfig() BaseConfig {
                DBBackend:          "leveldb",
                DBPath:             "data",
                KeysPath:           "keystore",
+               LogFile:            "log",
                PrivateKeyFile:     "node_key.txt",
                FederationFileName: "federation.json",
        }
@@ -143,6 +144,10 @@ func (b BaseConfig) DBDir() string {
        return rootify(b.DBPath, b.RootDir)
 }
 
+func (b BaseConfig) LogDir() string {
+       return rootify(b.LogFile, b.RootDir)
+}
+
 func (b BaseConfig) KeysDir() string {
        return rootify(b.KeysPath, b.RootDir)
 }