Add the log menu items
353730
public function addLogControllers()
    {
        // LOG SETUP CONTROLLER
        $this->addBrowsePage($this->_('Log Setup'), 'pr.log.maintenance', 'log-maintenance');

        // LOG CONTROLLER
        $page = $this->addPage($this->_('Log'), 'pr.log', 'log', 'index');
        $page->addAutofilterAction();
        $page->addExportAction();
        $page->addShowAction()
                ->setNamedParameters(\Gems_Model::LOG_ITEM_ID, 'gla_id');

        // LOG FILES CONTROLLER
        $this->addFilePage($this->_('Log files'), 'pr.log.files', 'log-file');
    }
1094858
def setup_menus():
    ''''''
    menu = MPMenuTop([])
    menu.add(MPMenuSubMenu('MAVExplorer',
                           items=[MPMenuItem('Settings', 'Settings', 'menuSettings'),
                                  MPMenuItem('Map', 'Map', '# map'),
                                  MPMenuItem('Save Graph', 'Save', '# save'),
                                  MPMenuItem('Reload Graphs', 'Reload', '# reload')]))
    menu.add(graph_menus())
    menu.add(MPMenuSubMenu('FlightMode', items=flightmode_menu()))

    mestate.console.set_menu(menu, menu_callback)
303308
def add_log_handler(log, handler=None, debug=None, fmt=None):
    
    if debug:
        log.setLevel(debug)
    if handler:
        # if not fmt:
        #     fmt = __LOG_FMT
        if fmt:
            handler.setFormatter(fmt)
        log.addHandler(handler)
575558
def add_loghandler (handler):
    """"""
    format = "%(levelname)s %(name)s %(asctime)s %(threadName)s %(message)s"
    handler.setFormatter(logging.Formatter(format))
    logging.getLogger(LOG_ROOT).addHandler(handler)
    logging.getLogger().addHandler(handler)
29935
def _insert_options(self, menu):
        """"""
        menu.append(Gtk.SeparatorMenuItem())
        menu.append(self._menuitem(
            _('Mount disc image'),
            self._icons.get_icon('losetup', Gtk.IconSize.MENU),
            run_bg(lambda _: self._losetup())
        ))
        menu.append(Gtk.SeparatorMenuItem())
        menu.append(self._menuitem(
            _("Enable automounting"),
            icon=None,
            onclick=lambda _: self._daemon.automounter.toggle_on(),
            checked=self._daemon.automounter.is_on(),
        ))
        menu.append(self._menuitem(
            _("Enable notifications"),
            icon=None,
            onclick=lambda _: self._daemon.notify.toggle(),
            checked=self._daemon.notify.active,
        ))
        # append menu item for closing the application
        if self._quit_action:
            menu.append(Gtk.SeparatorMenuItem())
            menu.append(self._menuitem(
                _('Quit'),
                self._icons.get_icon('quit', Gtk.IconSize.MENU),
                lambda _: self._quit_action()
            ))
89529
def addLogEntry(self, entry, save=True):
        """"""
        # create log directory if it doesn't exist
        # error will be thrown if this is not possible
        _busy = Purr.BusyIndicator()
        self._initIndexDir()
        # discard temporary watchers -- these are only used to keep track of
        # deleted files
        self.temp_watchers = {}
        # ignored entries are only there to carry info on ignored data products
        # All we do is save them, and update DP policies based on them
        if entry.ignore:
            entry.save(self.logdir)
        # proper entries are added to list
        else:
            self.entries.append(entry)
            Purr.progressMessage("Saving new log entry")
            # find previous entry -- skip over "ignore" entries
            for prev in self.entries[-2::-1]:
                if not prev.ignore:
                    break
            else:
                prev = None
            entry.setLogDirectory(self.logdir)
            entry.setPrevUpNextLinks(prev=prev, up=os.path.join("..", Purr.RenderIndex.INDEX))
            entry.save()
            self.timestamp = self.last_scan_timestamp
            # regenerate links of previous entry
            prev and prev.generateIndex()
            # and our log may need to be regenerated
            if save:
                self.save()
        self.updatePoliciesFromEntry(entry, new=True)
1271285
def addLogForRemoteCommands(self, logname):
        
        self.rc_log = self.addLog(logname)
        return self.rc_log
1197863
public function addLogger() 
    {

        $args = func_get_args();

        foreach ($args as $class) {
            if (!in_array($class, $this->loggers) && 
                ($class instanceof IDS_Log_Interface)) {
                $this->loggers[] = $class;
            }
        }
    }
33807
def add_log(self, x, flag_also_show=False):
        """"""
        self.parent_form.add_log(x, flag_also_show)
489266
public function addMenu()
    {
        add_submenu_page(
            'tools.php',
            __('StaticWP', $this->plugin),
            __('StaticWP', $this->plugin),
            'manage_options',
            $this->plugin,
            array($this, 'viewPage')
        );
    }
269391
protected function _addNotificationMenu()
    {
        $this->Menu->area('headerLeft');

        $this->Menu->add('notifier.notifications', [
            'title' => __d('CakeAdmin', 'Notifications ({0})', $this->Notifier->countNotifications(null, true)),
            'url' => '#',
            'weight' => 5
        ]);

        $notifications = $this->Notifier->getNotifications(null, true);

        foreach ($notifications as $not) {
            $this->Menu->add('notifier.notifications.' . $not->id, [
                'parent' => 'notifier.notifications',
                'title' => $not->title,
                'url' => [
                    'prefix' => 'admin',
                    'plugin' => 'CakeAdmin',
                    'controller' => 'Notifications',
                    'action' => 'index'
                ]
            ]);
        }

        $this->Menu->add('notifier.notifications.url', [
            'parent' => 'notifier.notifications',
            'title' => '> ' . __d('CakeAdmin', 'All Notifications'),
            'url' => [
                'prefix' => 'admin',
                'plugin' => 'CakeAdmin',
                'controller' => 'Notifications',
                'action' => 'index'
            ]
        ]);
    }
1002105
def update_recent_file_menu(self):
        """"""
        recent_files = []
        for fname in self.recent_files:
            if self.is_file_opened(fname) is None and osp.isfile(fname):
                recent_files.append(fname)
        self.recent_file_menu.clear()
        if recent_files:
            for fname in recent_files:
                action = create_action(self, fname,
                                       icon=ima.icon('FileIcon'),
                                       triggered=self.load)
                action.setData(to_qvariant(fname))
                self.recent_file_menu.addAction(action)
        self.clear_recent_action.setEnabled(len(recent_files) > 0)
        add_actions(self.recent_file_menu, (None, self.max_recent_action,
                                            self.clear_recent_action))
1288646
protected function createComponentLogsList(): DataGrid
	{
		$grid = $this->dataGridFactory->create();

		$grid->setDataSource($this->app->logs->logs);

		$grid->setDefaultSort(['changed' => 'DESC']);

		$clearLogs = $grid->addToolbarButton('clearLogs!', 'cms.logs.clearLogs');
		$clearLogs->setClass($clearLogs->getClass() . ' ajax');
		$clearLogs->addAttributes(['data-confirm' => $this->translate('cms.logs.confirmDelete', 2)]);

		$grid->addColumnText('name', 'cms.logs.log')
			->setFilterText();

		$grid->addColumnText('formatedSize', 'cms.logs.size');

		$grid->addColumnDateTime('changed', 'cms.logs.lastChange')
			->setSortable()
			->setFormat(Date::getFormat());

		$grid->addAction('showFile', null)
			->addAttributes(['target' => '_blank'])
			->setIcon('edit')
			->setTitle('cms.logs.show');

		$grid->addAction('downloadFile', null)
			->setIcon('download')
			->setTitle('cms.logs.download');

		$grid->addAction('delete', null, 'delete!')
			->setIcon('trash')
			->setTitle('default.delete')
			->setClass('btn btn-xs btn-danger ajax')
			->setConfirm(function ($item) {
				return $this->translate('cms.logs.confirmDelete', 1, ['name' => $item['name']]);
			});

		$grid->addGroupAction('cms.logs.download')->onSelect[] = [$this, 'actionDownloadFile'];
		$grid->addGroupAction('default.delete')->onSelect[] = [$this, 'handleDelete'];

		return $grid;
	}
560327
def setup_recent_files_menu(self):
        
        self.recent_files_manager = widgets.RecentFilesManager(
            'pyQode', 'notepad')
        self.menu_recents = widgets.MenuRecentFiles(
            self.menuFile, title='Recents',
            recent_files_manager=self.recent_files_manager)
        self.menu_recents.open_requested.connect(self.open_file)
        self.menuFile.insertMenu(self.actionSave, self.menu_recents)
        self.menuFile.insertSeparator(self.actionSave)
312367
public void addNavButtons()
    {
        BaseApplication application = (BaseApplication)this.getTask().getApplication();
        String strMessageScreen = application.getResources(ResourceConstants.MAIN_RESOURCE, true).getString(MessageLog.MESSAGE_SCREEN);
        new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MessageLog.MESSAGE_ICON, MessageLog.MESSAGE_SCREEN, strMessageScreen);
        if (!this.isContactDisplay())
        {
            strMessageScreen = application.getResources(ResourceConstants.MAIN_RESOURCE, true).getString(MessageLog.SOURCE_SCREEN);
            new SCannedBox(this.getNextLocation(ScreenConstants.FIRST_SCREEN_LOCATION, ScreenConstants.SET_ANCHOR), this, null, ScreenConstants.DEFAULT_DISPLAY, null, null, MessageLog.SOURCE_ICON, MessageLog.SOURCE_SCREEN, strMessageScreen);
        }
        super.addNavButtons();  // Next buttons will be "First!"
    }
235394
protected function addDefaultLoggingOptions()
    {
        $this
            ->addOption(
                'type',
                null,
                InputOption::VALUE_OPTIONAL,
                $this->trans('commands.database.log.common.options.type')
            )
            ->addOption(
                'severity',
                null,
                InputOption::VALUE_OPTIONAL,
                $this->trans('commands.database.log.common.options.severity')
            )
            ->addOption(
                'user-id',
                null,
                InputOption::VALUE_OPTIONAL,
                $this->trans('commands.database.log.common.options.user-id')
            );
    }
246074
@SuppressWarnings("deprecation")
    private void fillTable() {

        removeAllItems();
        List<Logger> loggerList = CmsLog4jUtil.getAllLoggers();
        for (Logger logger : loggerList) {
            addItemForLogger(logger);
        }
    }