Made logging depending on development or production.