how to use logging libraries