public function clearActivity(string $env):Renderer
    {
        if (!in_array($env, array("dev", "prod"))) {
            throw new Server500(new \ArrayObject(array("explain" => "Bad environment name $env",
                "solution" => "Environment must be 'dev' or 'prod' ")));
        }
        Server::delete(FEnv::get("framework.logs").strtolower($env).".log", 'file');
        @Server::create(FEnv::get("framework.logs").strtolower($env).".log", 'file');

        return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
    }
public function clearActivity(string $env):Renderer
    {
        if (!in_array($env, array("dev", "prod"))) {
            throw new Server500(new \ArrayObject(array("explain" => "Bad environment name $env",
                "solution" => "Environment must be 'dev' or 'prod' ")));
        }
        Server::delete(FEnv::get("framework.logs").strtolower($env).".log", 'file');
        @Server::create(FEnv::get("framework.logs").strtolower($env).".log", 'file');

        return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
    }
public function clearActivity ( string $ env ) : Renderer { if ( ! in_array ( $ env , array ( "dev" , "prod" ) ) ) { throw new Server500 ( new \ ArrayObject ( array ( "explain" => "Bad environment name $env" , "solution" => "Environment must be 'dev' or 'prod' " ) ) ) ; } Server :: delete ( FEnv :: get ( "framework.logs" ) . strtolower ( $ env ) . ".log" , 'file' ) ; @ Server :: create ( FEnv :: get ( "framework.logs" ) . strtolower ( $ env ) . ".log" , 'file' ) ; return ( ( new Renderer ( ) ) -> jsonRenderer ( array ( "code" => 200 , "msg" => "OK" ) ) ) ; }
clear log of dev or prod environment
@param $env string Environment
@return Renderer JSON response
@throws Server500
@throws \Exception
clear log of dev or prod environment