ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilLogComponentLevel Class Reference

individual log levels for components More...

+ Collaboration diagram for ilLogComponentLevel:

Public Member Functions

 __construct ($a_component_id)
 
 getComponentId ()
 
 setLevel ($a_level)
 
 getLevel ()
 
 update ()
 
 read ()
 Read entry @global 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)

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

17 {
18 $this->compontent_id = $a_component_id;
19 $this->read();
20 }
read()
Read entry @global type $ilDB.

References read().

+ Here is the call graph for this function:

Member Function Documentation

◆ getComponentId()

ilLogComponentLevel::getComponentId ( )

Definition at line 22 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 32 of file class.ilLogComponentLevel.php.

References $component_level.

Referenced by update().

+ Here is the caller graph for this function:

◆ read()

ilLogComponentLevel::read ( )

Read entry @global type $ilDB.

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

55 {
56 global $ilDB;
57
58 $query = 'SELECT * FROM log_components '.
59 'WHERE component_id = '.$ilDB->quote($this->getComponentId(),'text');
60
61 $res = $ilDB->query($query);
62 while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
63 {
64 $this->component_level = $row->log_level;
65 }
66
67 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and getComponentId().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setLevel()

ilLogComponentLevel::setLevel (   $a_level)

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

28 {
29 $this->component_level = $a_level;
30 }

◆ update()

ilLogComponentLevel::update ( )

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

38 {
39 global $ilDB;
40
41 ilLoggerFactory::getLogger('log')->debug('update called');
42
43 $ilDB->replace(
44 'log_components',
45 array('component_id' => array('text',$this->getComponentId())),
46 array('log_level' => array('integer',$this->getLevel()))
47 );
48 }
static getLogger($a_component_id)
Get component logger.

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

+ 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: