You need to include session_start() and if $_SESSION['username'] is not set you have to set it.
I'm not sure why you getting error for $log_dt.
$_SESSION['username'] = "log_username";
$log_username=$_SESSION['username']; //correctly pirints the username currently loged in when echo
$log_dt=date("Y/m/d h:i:s A"); //correctly prints the time and date when echo
$query = "INSERT into logs VALUES ('','$event','$log_username','$log_dt')";
if ($result=mysql_query($query) or die (mysql_error()));
EDIT: If reglog() was called it would generate those errors as logic_earth stated.