从codeigniter中的模型调用库

I'm trying to call a library from model in codeigniter but doesn't want to fire and I don't really know how to debug it, I have been trying to use codeigniters default logging method but doesn't show anything. My code looks as it follows.

class Model_products extends CI_Model{


    function __construct(){
        parent::__construct();
        $this->load->library('ApiClient');
        log_message('error', $this->load->library('ApiClient'));

}       
}

/application/libraries/ApiClient.php

libary final class ApiClient
{}

You cannot name a library ApiClient - class names should follow the CI naming convention (which is identical to ucfirst()) and when loading anything in CI you need to load it with lowercase naming.

Naming is the key.

Your file should be named Apiclient.php (libraries has the first letter in uppercase in the filenames, models, views and controller are all lowercase filenaming).

Your class definition should reflect this also:

class Apiclient
{
  ...
}

And when using the CI instance to load the library, you need to load it with lowercase naming:

$this->load->library('apiclient');

You miss a semicolon at the end of your line $this->load->library('ApiClient'). Could this be it?