insert msg@(LogMessage _ time _) (Node left root@(LogMessage _ rTime _) right)
    | time < rTime = Node (insert msg left) root right
    | otherwise    = Node left root (insert msg right)
insert msg@(LogMessage _ time _) (Node left root@(LogMessage _ rTime _) right)
    | time < rTime = Node (insert msg left) root right
    | otherwise    = Node left root (insert msg right)
insert msg@(LogMessage _ time _) (Node left root@(LogMessage _ rTime _) right)
    | time < rTime = Node (insert msg left) root right
    | otherwise    = Node left root (insert msg right)