Check if logger is available, if not use echo for output.