4 include_once
'./Services/Object/classes/class.ilObjectGUI.php';
39 public function __construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output =
true)
44 parent::__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output);
51 $this->tabs_gui = $ilTabs;
55 $this->lng->loadLanguageModule(
'logging');
56 $this->lng->loadLanguageModule(
'log');
58 include_once
'./Services/Logging/classes/public/class.ilLoggerFactory.php';
80 $next_class = $this->ctrl->getNextClass($this);
81 $cmd = $this->ctrl->getCmd();
86 case 'ilpermissiongui':
87 $this->tabs_gui->setTabActive(
'perm_settings');
88 include_once(
"Services/AccessControl/classes/class.ilPermissionGUI.php");
90 $ret =& $this->ctrl->forwardCommand($perm_gui);
114 global $rbacsystem, $ilAccess;
116 if ($ilAccess->checkAccess(
"read",
'',$this->object->getRefId()))
118 $this->tabs_gui->addTarget(
119 static::SECTION_SETTINGS,
120 $this->ctrl->getLinkTargetByClass(
'ilobjloggingsettingsgui',
"settings")
123 if ($ilAccess->checkAccess(
'edit_permission',
'',$this->object->getRefId()))
125 $this->tabs_gui->addTarget(
127 $this->ctrl->getLinkTargetByClass(
'ilpermissiongui',
"perm")
134 $this->tabs_gui->addSubTab(
135 static::SUB_SECTION_MAIN,
136 $this->lng->txt(static::SUB_SECTION_MAIN),
137 $this->ctrl->getLinkTarget($this,
'settings')
139 $this->tabs_gui->addSubTab(
140 static::SUB_SECTION_ERROR,
141 $this->lng->txt(static::SUB_SECTION_ERROR),
142 $this->ctrl->getLinkTarget($this,
'errorSettings')
144 $this->tabs_gui->addSubTab(
145 static::SUB_SECTION_COMPONENTS,
146 $this->lng->txt(static::SUB_SECTION_COMPONENTS),
147 $this->ctrl->getLinkTarget($this,
'components')
150 $this->tabs_gui->activateSubTab($a_section);
155 include_once(
"Services/Logging/classes/class.ilLoggingDBSettings.php");
176 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId()))
178 $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->MESSAGE);
181 $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
188 $this->tpl->setContent(
$form->getHTML());
201 include_once
'Services/WebServices/RPC/classes/class.ilRPCServerSettings.php';
205 if(!$rbacsystem->checkAccess(
'write',$this->object->getRefId()))
207 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
212 if(
$form->checkInput())
221 $this->
getLogger()->info(print_r(
$form->getInput(
'browser_users'),TRUE));
226 $this->ctrl->redirect($this,
'settings');
231 $form->setValuesByPost();
245 include_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
246 include_once
'./Services/Search/classes/class.ilSearchSettings.php';
249 $form->setTitle($this->lng->txt(
'logs_settings'));
250 $form->setFormAction($this->ctrl->getFormAction($this));
252 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId()))
254 $form->addCommandButton(
'updateSettings', $this->lng->txt(
'save'));
259 $level->setValue($this->
getSettings()->getLevel());
260 $form->addItem($level);
263 $cache->
setInfo($this->lng->txt(
'log_cache_info'));
265 $cache->setChecked($this->
getSettings()->isCacheEnabled());
266 $form->addItem($cache);
268 $cache_level =
new ilSelectInputGUI($this->lng->txt(
'log_cache_level'),
'cache_level');
270 $cache_level->setValue($this->
getSettings()->getCacheLevel());
271 $cache->addSubItem($cache_level);
275 $memory->setChecked($this->
getSettings()->isMemoryUsageEnabled());
276 $form->addItem($memory);
281 $browser->setChecked($this->
getSettings()->isBrowserLogEnabled());
282 $form->addItem($browser);
285 $users =
new ilTextInputGUI($this->lng->txt(
'log_browser_users'),
'browser_users');
287 $users->setMulti(TRUE);
288 $users->setMultiValues($this->
getSettings()->getBrowserLogUsers());
292 $browser->addSubItem($users);
304 $this->tabs_gui->activateTab(static::SECTION_SETTINGS);
305 $this->
setSubTabs(static::SUB_SECTION_COMPONENTS);
307 include_once
'./Services/Logging/classes/class.ilLogComponentTableGUI.php';
312 $GLOBALS[
'tpl']->setContent($table->getHTML());
323 foreach(
$_POST[
'level'] as $component_id => $value)
327 include_once
'./Services/Logging/classes/class.ilLogComponentLevel.php';
329 $level->setLevel($value);
334 $this->ctrl->redirect($this,
'components');
341 $component->setLevel(null);
342 $component->update();
345 $this->ctrl->redirect($this,
'components');
352 if(!$ilAccess->checkAccess(
'read',
'',$this->object->getRefId())) {
353 $ilErr->raiseError($this->lng->txt(
'permission_denied'),$ilErr->MESSAGE);
356 $this->tabs_gui->setTabActive(static::SECTION_SETTINGS);
362 $this->tpl->setContent(
$form->getHTML());
370 if(!$rbacsystem->checkAccess(
'write',$this->object->getRefId())) {
371 $this->
ilias->raiseError($this->lng->txt(
"permission_denied"),$this->
ilias->error_obj->MESSAGE);
375 if(
$form->checkInput()) {
380 $this->ctrl->redirect($this,
'errorSettings');
384 $form->setValuesByPost();
391 require_once
'./Services/Form/classes/class.ilPropertyFormGUI.php';
392 require_once
'./Services/Search/classes/class.ilSearchSettings.php';
395 $form->setTitle($this->lng->txt(
'logs_settings'));
396 $form->setFormAction($this->ctrl->getFormAction($this));
398 if($ilAccess->checkAccess(
'write',
'',$this->object->getRefId())) {
399 $form->addCommandButton(
'updateErrorSettings', $this->lng->txt(
'save'));
404 $form->addItem($folder);
406 $mail =
new ilTextInputGUI($this->lng->txt(
'log_error_mail'),
'error_mail');
408 $form->addItem($mail);
414 require_once(
"Services/Logging/classes/error/class.ilLoggingErrorSettings.php");
419 return $this->error_settings;
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
initFormSettings()
Init settings form.
setValue($a_value)
Set Value.
const SUB_SECTION_COMPONENTS
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static getLevelOptions()
Get log level options.
components()
Show components.
mail($to, $subject, $message, $additional_headers=null, $additional_parameters=null)
executeCommand()
Execute command.
prepareOutput($a_show_subobjects=true)
prepare output
getSettings()
Get log settings.
Class ilObjectGUI Basic methods of all Output classes.
This class represents a text property in a property form.
redirection script todo: (a better solution should control the processing via a xml file) ...
settings(ilPropertyFormGUI $form=null)
Show settings public.
individual log levels for components
static getInstance()
Get instance.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
saveComponentLevels()
Save form.
updateSettings()
Save settings public.
This class represents a non editable value in a property form.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static getLogger($a_component_id)
Get component logger.
__construct($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
Constructor.
setValue($a_value)
Set Value.
Component logger with individual log levels by component id.