Classes to store log in databases