src/StimLog/Event/LogEvent.php
public static function create($className, $level) {
        // Create the event
        $event = new LogEvent();

        // Assign level and message
        $event->_setLevel(LogLevel::create($level));

        // Initialize current date and time (with milliseconds)
        $event->_setDate(DateMilli::create());

        // Initialize trace
        $trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 4);

        $trace['class'] = $className;
        $trace['file'] = $trace[2]['file'];
        $trace['line'] = $trace[2]['line'];
        $event->_setTrace($trace);

        return $event;
    }
public static function create($className, $level) {
        // Create the event
        $event = new LogEvent();

        // Assign level and message
        $event->_setLevel(LogLevel::create($level));

        // Initialize current date and time (with milliseconds)
        $event->_setDate(DateMilli::create());

        // Initialize trace
        $trace = debug_backtrace(DEBUG_BACKTRACE_PROVIDE_OBJECT, 4);

        $trace['class'] = $className;
        $trace['file'] = $trace[2]['file'];
        $trace['line'] = $trace[2]['line'];
        $event->_setTrace($trace);

        return $event;
    }
public static function create ( $ className , $ level ) { // Create the event
 $ event = new LogEvent ( ) ; // Assign level and message
 $ event -> _setLevel ( LogLevel :: create ( $ level ) ) ; // Initialize current date and time (with milliseconds)
 $ event -> _setDate ( DateMilli :: create ( ) ) ; // Initialize trace
 $ trace = debug_backtrace ( DEBUG_BACKTRACE_PROVIDE_OBJECT , 4 ) ; $ trace [ 'class' ] = $ className ; $ trace [ 'file' ] = $ trace [ 2 ] [ 'file' ] ; $ trace [ 'line' ] = $ trace [ 2 ] [ 'line' ] ; $ event -> _setTrace ( $ trace ) ; return $ event ; }
Create a new log event and return it

@param string $className the class name where the event was created
@param integer $level the log level of the event
@return LogEvent
Create a new log event and return it