Added logger to warning messages with tests.
