provided logging function can now limit the length of the log