ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilLogComponentLevel Class Reference

individual log levels for components More...

+ Collaboration diagram for ilLogComponentLevel:

Public Member Functions

 __construct ($a_component_id, $a_level=null)
 
 getComponentId ()
 
 setLevel ($a_level)
 
 getLevel ()
 
 update ()
 
 read ()
 Read entry type $ilDB. More...
 

Private Attributes

 $compontent_id = ''
 
 $component_level = null
 

Detailed Description

individual log levels for components

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

Definition at line 11 of file class.ilLogComponentLevel.php.

Constructor & Destructor Documentation

◆ __construct()

ilLogComponentLevel::__construct (   $a_component_id,
  $a_level = null 
)

Definition at line 16 of file class.ilLogComponentLevel.php.

References read(), and setLevel().

17  {
18  $this->compontent_id = $a_component_id;
19  if ($a_level === null) {
20  $this->read();
21  } else {
22  $this->setLevel($a_level);
23  }
24  }
read()
Read entry type $ilDB.
+ Here is the call graph for this function:

Member Function Documentation

◆ getComponentId()

ilLogComponentLevel::getComponentId ( )

Definition at line 26 of file class.ilLogComponentLevel.php.

References $compontent_id.

Referenced by read(), and update().

+ Here is the caller graph for this function:

◆ getLevel()

ilLogComponentLevel::getLevel ( )

Definition at line 36 of file class.ilLogComponentLevel.php.

References $component_level.

Referenced by update().

+ Here is the caller graph for this function:

◆ read()

ilLogComponentLevel::read ( )

Read entry type $ilDB.

Definition at line 60 of file class.ilLogComponentLevel.php.

References $DIC, $ilDB, $query, $res, $row, ilDBConstants\FETCHMODE_OBJECT, and getComponentId().

Referenced by __construct().

61  {
62  global $DIC;
63 
64  $ilDB = $DIC['ilDB'];
65 
66  $query = 'SELECT * FROM log_components ' .
67  'WHERE component_id = ' . $ilDB->quote($this->getComponentId(), 'text');
68 
69  $res = $ilDB->query($query);
70  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
71  $this->component_level = $row->log_level;
72  }
73  }
global $DIC
Definition: saml.php:7
foreach($_POST as $key=> $value) $res
$query
$row
global $ilDB
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLevel()

ilLogComponentLevel::setLevel (   $a_level)

Definition at line 31 of file class.ilLogComponentLevel.php.

Referenced by __construct().

32  {
33  $this->component_level = $a_level;
34  }
+ Here is the caller graph for this function:

◆ update()

ilLogComponentLevel::update ( )

Definition at line 41 of file class.ilLogComponentLevel.php.

References $DIC, $ilDB, getComponentId(), getLevel(), and ilLoggerFactory\getLogger().

42  {
43  global $DIC;
44 
45  $ilDB = $DIC['ilDB'];
46 
47  ilLoggerFactory::getLogger('log')->debug('update called');
48 
49  $ilDB->replace(
50  'log_components',
51  array('component_id' => array('text',$this->getComponentId())),
52  array('log_level' => array('integer',$this->getLevel()))
53  );
54  }
global $DIC
Definition: saml.php:7
global $ilDB
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:

Field Documentation

◆ $component_level

ilLogComponentLevel::$component_level = null
private

Definition at line 14 of file class.ilLogComponentLevel.php.

Referenced by getLevel().

◆ $compontent_id

ilLogComponentLevel::$compontent_id = ''
private

Definition at line 13 of file class.ilLogComponentLevel.php.

Referenced by getComponentId().


The documentation for this class was generated from the following file: