// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import React from 'react';
import * as Utils from 'utils/utils.jsx';
import AdminSettings from './admin_settings.jsx';
import BooleanSetting from './boolean_setting.jsx';
import DropdownSetting from './dropdown_setting.jsx';
import {FormattedMessage, FormattedHTMLMessage} from 'react-intl';
import SettingsGroup from './settings_group.jsx';
import TextSetting from './text_setting.jsx';
export default class LogSettings extends AdminSettings {
constructor(props) {
super(props);
this.getConfigFromState = this.getConfigFromState.bind(this);
this.renderSettings = this.renderSettings.bind(this);
}
getConfigFromState(config) {
config.LogSettings.EnableConsole = this.state.enableConsole;
config.LogSettings.ConsoleLevel = this.state.consoleLevel;
config.LogSettings.EnableFile = this.state.enableFile;
config.LogSettings.FileLevel = this.state.fileLevel;
config.LogSettings.FileLocation = this.state.fileLocation;
config.LogSettings.FileFormat = this.state.fileFormat;
config.LogSettings.EnableWebhookDebugging = this.state.enableWebhookDebugging;
config.LogSettings.EnableDiagnostics = this.state.enableDiagnostics;
return config;
}
getStateFromConfig(config) {
return {
enableConsole: config.LogSettings.EnableConsole,
consoleLevel: config.LogSettings.ConsoleLevel,
enableFile: config.LogSettings.EnableFile,
fileLevel: config.LogSettings.FileLevel,
fileLocation: config.LogSettings.FileLocation,
fileFormat: config.LogSettings.FileFormat,
enableWebhookDebugging: config.LogSettings.EnableWebhookDebugging,
enableDiagnostics: config.LogSettings.EnableDiagnostics
};
}
renderTitle() {
return (
{'%T'} |
|
{'%D'} |
|
{'%d'} |
|
{'%L'} |
|
{'%S'} |
|
{'%M'} |
|