<?php
/**
 * @copyright (c) Kufer Software GmbH, Loisachstrasse 4, D-84453 Mühldorf
 */


class DateiLoggerAnmeldung
{
  
  public static function logg($pMessage, $pSeverity = 0)
  {
    if ($pSeverity >= LoggerAnmeldung::getSeverity()) {
      $logPath = ConstantOperations::getPathForLog();
      $logfile = $logPath . 'Anmeldelog.txt';
      if (file_exists($logPath)) {
        $handle = @fopen($logfile, 'a');
        if ($handle === false) {
          return;
        }
        fwrite($handle, date('Y.M.d H:i:s: ') . " $pMessage\r\n");
        fclose($handle);
      }
    }
  }
}