ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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 58 of file class.ilLogComponentLevel.php.

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

Referenced by __construct().

59  {
60  global $ilDB;
61 
62  $query = 'SELECT * FROM log_components ' .
63  'WHERE component_id = ' . $ilDB->quote($this->getComponentId(), 'text');
64 
65  $res = $ilDB->query($query);
66  while ($row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT)) {
67  $this->component_level = $row->log_level;
68  }
69  }
foreach($_POST as $key=> $value) $res
$query
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 $ilDB, array, getComponentId(), getLevel(), and ilLoggerFactory\getLogger().

42  {
43  global $ilDB;
44 
45  ilLoggerFactory::getLogger('log')->debug('update called');
46 
47  $ilDB->replace(
48  'log_components',
49  array('component_id' => array('text',$this->getComponentId())),
50  array('log_level' => array('integer',$this->getLevel()))
51  );
52  }
Create styles array
The data for the language used.
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: