public static function output(string $message, string $interface = 'file')
    {
        $env = FEnv::get("framework.env");
        $file_debug = FEnv::get(("dev" === $env)? "framework.logs.debug.dev.file" :
            "framework.logs.debug.prod.file");
        if (self::$logstatus == true) {
            self::input($message);
            if ($interface == 'file') {
                $debug = array();
                $debug['time'] = self::$logformat['time'];
                $debug['content'] = self::$logformat['msg'];
                $log = (array) JL::open($file_debug);
                $c = count($log);
                $log[$c] = $debug;
                $log = (object) $log;
                JL::put(
                    $file_debug,
                    json_encode($log, JSON_PRETTY_PRINT)
                );

                JL::close($file_debug);
                return ((new Renderer())->textRenderer(" "));
            } elseif ($interface == 'screen') {
                return (new Renderer())->textRenderer("<br>Time : " . self::$logformat['time'] .
                    " ### Content : " . self::$logformat['msg'] . "<br>");
            } else {
                throw new Server500(new \ArrayObject(array("explain" => "Undefined interface $interface",
                    "solution" => "interface available for debug [file, screen]", "line_error" => "43")));
            }
        } else {
            return ((new Renderer())->textRenderer(" "));
        }
    }
public static function output(string $message, string $interface = 'file')
    {
        $env = FEnv::get("framework.env");
        $file_debug = FEnv::get(("dev" === $env)? "framework.logs.debug.dev.file" :
            "framework.logs.debug.prod.file");
        if (self::$logstatus == true) {
            self::input($message);
            if ($interface == 'file') {
                $debug = array();
                $debug['time'] = self::$logformat['time'];
                $debug['content'] = self::$logformat['msg'];
                $log = (array) JL::open($file_debug);
                $c = count($log);
                $log[$c] = $debug;
                $log = (object) $log;
                JL::put(
                    $file_debug,
                    json_encode($log, JSON_PRETTY_PRINT)
                );

                JL::close($file_debug);
                return ((new Renderer())->textRenderer(" "));
            } elseif ($interface == 'screen') {
                return (new Renderer())->textRenderer("<br>Time : " . self::$logformat['time'] .
                    " ### Content : " . self::$logformat['msg'] . "<br>");
            } else {
                throw new Server500(new \ArrayObject(array("explain" => "Undefined interface $interface",
                    "solution" => "interface available for debug [file, screen]", "line_error" => "43")));
            }
        } else {
            return ((new Renderer())->textRenderer(" "));
        }
    }
public static function output ( string $ message , string $ interface = 'file' ) { $ env = FEnv :: get ( "framework.env" ) ; $ file_debug = FEnv :: get ( ( "dev" === $ env ) ? "framework.logs.debug.dev.file" : "framework.logs.debug.prod.file" ) ; if ( self :: $ logstatus == true ) { self :: input ( $ message ) ; if ( $ interface == 'file' ) { $ debug = array ( ) ; $ debug [ 'time' ] = self :: $ logformat [ 'time' ] ; $ debug [ 'content' ] = self :: $ logformat [ 'msg' ] ; $ log = ( array ) JL :: open ( $ file_debug ) ; $ c = count ( $ log ) ; $ log [ $ c ] = $ debug ; $ log = ( object ) $ log ; JL :: put ( $ file_debug , json_encode ( $ log , JSON_PRETTY_PRINT ) ) ; JL :: close ( $ file_debug ) ; return ( ( new Renderer ( ) ) -> textRenderer ( " " ) ) ; } elseif ( $ interface == 'screen' ) { return ( new Renderer ( ) ) -> textRenderer ( "<br>Time : " . self :: $ logformat [ 'time' ] . " ### Content : " . self :: $ logformat [ 'msg' ] . "<br>" ) ; } else { throw new Server500 ( new \ ArrayObject ( array ( "explain" => "Undefined interface $interface" , "solution" => "interface available for debug [file, screen]" , "line_error" => "43" ) ) ) ; } } else { return ( ( new Renderer ( ) ) -> textRenderer ( " " ) ) ; } }
Display a message
@param string $message String message
@param string $interface Manner to display message
@return mixed Result
@throws Server500
Display a message