module Module1 where
import Interlude
import Control.Effects.Logging
import Control.Effects.Logging.Sentry
main :: IO ()
main = logToSentry (sentryServiceFromDSN "http://2b34b80ce7804b28b206e04ac633da02:b7c32aaa5e764565a4e6b7765164cdea@sentry.deegeet.al/4") $
collectCrumbs $ messagesToCrumbs $ do
layerLogs (Context "layer1") $ do
logInfo "Hello from layer1"
addUserToLogs (LogUser "id" (Just "email@email.com") (Just "username")) $ layerLogs (Context "layer2") $ do
logInfo "Hello from layer2"
setDataToShowOf (Just (5 :: Int)) $ logInfo "This message has a data"
setDataToJsonOf [1, 2, 3 :: Int] $ logInfo "This message has data but is in layer1"
logWarning "No layers but should still have crumbs"