I'm writing an application to get slowlogs from redis. But It prints only the first slowlog entry, I'm sure there are at least 3 slowlog entries and I could get them via slowlog get through redis-cli.
Here is my code.
{-# LANGUAGE OverloadedStrings #-}
module Main where
import Database.Redis
import Control.Monad.Trans
main :: IO ()
main = do
conn <- connect defaultConnectInfo
runRedis conn $ do
logs <- slowlogGet 2
liftIO $ print logs
liftIO (print $ length logs)
I'm writing an application to get slowlogs from redis. But It prints only the first slowlog entry, I'm sure there are at least 3 slowlog entries and I could get them via
slowlog get
through redis-cli. Here is my code.Below is my program output:
Below is my
slowlog get
output: