Example #1
0
 public static function tearDown()
 {
     self::$m_instance = array();
 }
Example #2
0
 public function tearDown()
 {
     LeLogger::tearDown();
 }
Example #3
0
 public static function tearDown()
 {
     self::$m_instance = NULL;
 }
Example #4
0
/**
 * Define o status como error no servidor
 *
 * @param \Exception $exception
 *        	Exceção ocorrida
 * @param LeLogger $log
 * 					Log
 */
function internalServerError($exception, $log)
{
    $log->Error(sprintf("Um erro ocorreu no servidor: %s", $exception->getMessage()));
    setResponseStatus(HttpStatusCode::INTERNAL_SERVER_ERROR, $exception->getMessage());
    echo $exception->getMessage();
}
<?php

require_once 'LeLogger.php';
/*
 *  User - Defined Variables
 */
$LOGENTRIES_TOKEN = LOG_ENTRIES_TOKEN;
// Whether the socket is persistent or not
$Persistent = true;
// Whether the socket uses SSL/TLS or not
$SSL = LOG_SSL_ENABLED;
// Set the minimum severity of events to send
$Severity = LOG_LEVEL;
/*
 *  END  User - Defined Variables
 */
// Ignore this, used for PaaS that support configuration variables
$ENV_TOKEN = getenv('LOGENTRIES_TOKEN');
// Check for environment variable first and override LOGENTRIES_TOKEN variable accordingly
if ($ENV_TOKEN != false && $LOGENTRIES_TOKEN === "") {
    $LOGENTRIES_TOKEN = $ENV_TOKEN;
}
$log = LeLogger::getLogger($LOGENTRIES_TOKEN, $Persistent, $SSL, $Severity);
Example #6
0
//    If you change this from port 10000, you will have to change your settings port on your datahub machine,
//	  specifically in the datahub local config file in /etc/leproxy/leproxyLocal.config then restart leproxy - sudo service leproxy restart
$DATAHUB_PORT = 10000;
// Allow Your Host Name To Be Printed To Your Log Events As Key / Value Pairs.
// To give your Log events a Host_Name which will appear in your logs as Key Value Pairs, change this value to 'true' (without quotes)
$HOST_NAME_ENABLED = false;
// Enter a Customized Host Name to appear in your Logs - If no host name is entered one will be assigned based on your own Host name for the local machine using the php function gethostname();
$HOST_NAME = "";
// Enter a Host ID to appear in your Log events
// if $HOST_ID is empty "", it wil not print to your log events.  This value will only print to your log events if there is a value below as in $HOST_ID="12345".
$HOST_ID = "";
/************
*  END  -  User - Defined Variables
************/
// Whether the socket is persistent or not
$Persistent = true;
// Whether the socket uses SSL/TLS or not
$SSL = false;
// Set the minimum severity of events to send
$Severity = LOG_DEBUG;
/*
 *  END  User - Defined Variables
 */
// Ignore this, used for PaaS that support configuration variables
$ENV_TOKEN = getenv('LOGENTRIES_TOKEN');
// Check for environment variable first and override LOGENTRIES_TOKEN variable accordingly
if ($ENV_TOKEN != false && $LOGENTRIES_TOKEN === "") {
    $LOGENTRIES_TOKEN = $ENV_TOKEN;
}
$log = LeLogger::getLogger($LOGENTRIES_TOKEN, $Persistent, $SSL, $Severity, $DATAHUB_ENABLED, $DATAHUB_IP_ADDRESS, $DATAHUB_PORT, $HOST_ID, $HOST_NAME, $HOST_NAME_ENABLED, $HOST_TIMEZONE);