chore(debug): crop settings debug output
This commit is contained in:
parent
f31e509212
commit
a78cf6c301
@ -252,7 +252,7 @@ makeFoundation appSettings''@AppSettings{..} = do
|
|||||||
|
|
||||||
runAppLoggingT tempFoundation $ do
|
runAppLoggingT tempFoundation $ do
|
||||||
$logInfoS "InstanceID" $ UUID.toText appInstanceID
|
$logInfoS "InstanceID" $ UUID.toText appInstanceID
|
||||||
$logDebugS "Configuration" $ tshowShort appSettings''
|
$logDebugS "Configuration" $ tshowCrop appSettings''
|
||||||
$logDebugS "RTSFlags" . tshow =<< liftIO getRTSFlags
|
$logDebugS "RTSFlags" . tshow =<< liftIO getRTSFlags
|
||||||
|
|
||||||
smtpPool <- for appSmtpConf $ \c -> do
|
smtpPool <- for appSmtpConf $ \c -> do
|
||||||
@ -366,7 +366,7 @@ makeFoundation appSettings''@AppSettings{..} = do
|
|||||||
}
|
}
|
||||||
return . Just $ mkAvsQuery avsServer avsAuth avsEnv
|
return . Just $ mkAvsQuery avsServer avsAuth avsEnv
|
||||||
|
|
||||||
$logDebugS "Runtime configuration" $ tshowShort appSettings'
|
$logDebugS "Runtime configuration" $ tshowCrop appSettings'
|
||||||
|
|
||||||
let foundation = mkFoundation appSettings' sqlPool smtpPool ldapPool appCryptoIDKey appSessionStore appSecretBoxKey appWidgetMemcached appJSONWebKeySet appClusterID appMemcached appMemcachedLocal appUploadCache appVerpSecret appAuthKey appPersonalisedSheetFilesSeedKey appVolatileClusterSettingsCache appAvsQuery
|
let foundation = mkFoundation appSettings' sqlPool smtpPool ldapPool appCryptoIDKey appSessionStore appSecretBoxKey appWidgetMemcached appJSONWebKeySet appClusterID appMemcached appMemcachedLocal appUploadCache appVerpSecret appAuthKey appPersonalisedSheetFilesSeedKey appVolatileClusterSettingsCache appAvsQuery
|
||||||
|
|
||||||
|
|||||||
@ -208,7 +208,6 @@ data AppSettings = AppSettings
|
|||||||
, appCheckMissingFiles :: Maybe NominalDiffTime
|
, appCheckMissingFiles :: Maybe NominalDiffTime
|
||||||
, appFileUploadDBChunksize :: Int
|
, appFileUploadDBChunksize :: Int
|
||||||
|
|
||||||
, appFileChunkingParams :: FastCDCParameters
|
|
||||||
|
|
||||||
, appFavouritesQuickActionsBurstsize
|
, appFavouritesQuickActionsBurstsize
|
||||||
, appFavouritesQuickActionsAvgInverseRate :: Word64
|
, appFavouritesQuickActionsAvgInverseRate :: Word64
|
||||||
@ -241,18 +240,11 @@ data AppSettings = AppSettings
|
|||||||
, appJobMaxFlush :: Maybe Natural
|
, appJobMaxFlush :: Maybe Natural
|
||||||
|
|
||||||
, appCommunicationAttachmentsMaxSize :: Maybe Natural
|
, appCommunicationAttachmentsMaxSize :: Maybe Natural
|
||||||
|
|
||||||
|
, appFileChunkingParams :: FastCDCParameters
|
||||||
|
|
||||||
} deriving Show
|
} deriving Show
|
||||||
|
|
||||||
-- | Some settings strech for multiple lines
|
|
||||||
tshowShort :: AppSettings -> Text
|
|
||||||
tshowShort a = Text.take 256 $ tshow a' -- TODO: show only one line!
|
|
||||||
where a' = a {
|
|
||||||
appFileChunkingParams = afcp { fastCDCGearHashTable = error "emptyarray" }
|
|
||||||
}
|
|
||||||
afcp = appFileChunkingParams a
|
|
||||||
-- fcght = fastCDCGearHashTable afcp
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
data JobMode = JobsLocal { jobsAcceptOffload :: Bool }
|
data JobMode = JobsLocal { jobsAcceptOffload :: Bool }
|
||||||
| JobsOffload
|
| JobsOffload
|
||||||
|
|||||||
10
src/Utils.hs
10
src/Utils.hs
@ -277,8 +277,10 @@ stripAll = Text.filter (not . isSpace)
|
|||||||
|
|
||||||
-- | take first line, only
|
-- | take first line, only
|
||||||
cropText :: Text -> Text
|
cropText :: Text -> Text
|
||||||
cropText (Text.lines -> l:_) = Text.take 80 l
|
cropText (Text.take 255 -> t) = headDef t $ Text.lines t
|
||||||
cropText t = Text.take 80 t
|
|
||||||
|
tshowCrop :: Show a => a -> Text
|
||||||
|
tshowCrop = cropText . tshow
|
||||||
|
|
||||||
-- | strip leading and trailing whitespace and make case insensitive
|
-- | strip leading and trailing whitespace and make case insensitive
|
||||||
-- also helps to avoid the need to import just for CI.mk
|
-- also helps to avoid the need to import just for CI.mk
|
||||||
@ -574,6 +576,10 @@ mTuple = liftA2 (,)
|
|||||||
|
|
||||||
-- notNull = not . null
|
-- notNull = not . null
|
||||||
|
|
||||||
|
headDef :: a -> [a] -> a
|
||||||
|
headDef _ (h:_) = h
|
||||||
|
headDef d _ = d
|
||||||
|
|
||||||
lastMaybe :: [a] -> Maybe a
|
lastMaybe :: [a] -> Maybe a
|
||||||
lastMaybe [] = Nothing
|
lastMaybe [] = Nothing
|
||||||
lastMaybe [h] = Just h
|
lastMaybe [h] = Just h
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user