log metrics to file

contributes to #60
This commit is contained in:
Trolli Schmittlauch 2020-09-09 17:12:56 +02:00
parent 0ffe9effc0
commit 72eca0f4fe
3 changed files with 23 additions and 9 deletions

View file

@ -54,8 +54,8 @@ readConfig = do
bootstrapHost : bootstrapPortString : _ ->
[(bootstrapHost, read bootstrapPortString)]
_ -> []
fConf = FediChordConf {
confDomain = confDomainString
fConf = FediChordConf
{ confDomain = confDomainString
, confIP = toHostAddress6 . read $ ipString
, confDhtPort = read portString
, confBootstrapNodes = confBootstrapNodes'
@ -67,11 +67,12 @@ readConfig = do
, confResponsePurgeAge = 60 / fromIntegral speedup
, confRequestTimeout = 5 * 10^6 `div` speedup
, confRequestRetries = 3
}
sConf = ServiceConf {
confSubscriptionExpiryTime = fromIntegral $ 2*3600 `div` speedup
}
sConf = ServiceConf
{ confSubscriptionExpiryTime = fromIntegral $ 2*3600 `div` speedup
, confServicePort = read servicePortString
, confServiceHost = confDomainString
}
, confLogfilePath = "../simulationData/logs/" <> confDomainString <> ".log"
}
pure (fConf, sConf)