1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2026-04-21 22:05:38 -04:00
Files
Sonarr/frontend/src/Settings/General/LoggingSettings.js
T
Mark McDowall 767a09894a Health UI improvements
Fixed: Failing to get items from SABnzbd will report health error properly
Fixed: Some health checks not showing test all button on System: Health
2019-08-15 00:24:09 -07:00

49 lines
1.2 KiB
JavaScript

import PropTypes from 'prop-types';
import React from 'react';
import { inputTypes } from 'Helpers/Props';
import FieldSet from 'Components/FieldSet';
import FormGroup from 'Components/Form/FormGroup';
import FormLabel from 'Components/Form/FormLabel';
import FormInputGroup from 'Components/Form/FormInputGroup';
const logLevelOptions = [
{ key: 'info', value: 'Info' },
{ key: 'debug', value: 'Debug' },
{ key: 'trace', value: 'Trace' }
];
function LoggingSettings(props) {
const {
settings,
onInputChange
} = props;
const {
logLevel
} = settings;
return (
<FieldSet legend="Logging">
<FormGroup>
<FormLabel>Log Level</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="logLevel"
values={logLevelOptions}
helpTextWarning={logLevel.value === 'trace' ? 'Trace logging should only be enabled temporarily' : undefined}
onChange={onInputChange}
{...logLevel}
/>
</FormGroup>
</FieldSet>
);
}
LoggingSettings.propTypes = {
settings: PropTypes.object.isRequired,
onInputChange: PropTypes.func.isRequired
};
export default LoggingSettings;