Add Rails logger check

If `Rails` is defined, use the Rails logger.