#!/bin/sh

SERVER=$(which > /dev/null apache2 && printf "apache2" || which > /dev/null nginx && printf "nginx" || printf "ERROR: server not detected, needs to be set manually")

{ zcat /var/log/"$SERVER"/error.log.*.gz; cat /var/log/"$SERVER"/error.log /var/log/"$SERVER"/error.log.1; } | grep --color=auto -a "$@"
