public class LogsClientSideElement extends StaticClientSideElement
ClientSideElement.Script, ClientSideElement.ScriptFile| Modifier and Type | Field and Description |
|---|---|
private static String |
__LOGS_BASE
The path to the application's logs folder
|
private SourceResolver |
_sourceResolver
The Excalibur source resolver
|
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script| Constructor and Description |
|---|
LogsClientSideElement() |
| Modifier and Type | Method and Description |
|---|---|
private void |
_changeLogLevel(LoggerRepository loggerRepository,
String category,
String mode) |
private boolean |
_deleteFile(String fileLocation) |
Map<String,Object> |
changeLogLevel(String level,
String category)
Change the log level of the selected category to the selected level
|
Map<String,Object> |
deleteLogs(List<String> files)
Delete the log files
|
Map<String,Object> |
purgeLogs()
Delete the log entries that are at least 12 days old
|
void |
service(ServiceManager serviceManager) |
_configureClass, _configureParameters, _configureScript, configureInitialParameters_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, getScripts, hasRight, setPluginInfo, toStringgetLogger, setLoggerprivate static final String __LOGS_BASE
private SourceResolver _sourceResolver
public LogsClientSideElement()
public void service(ServiceManager serviceManager) throws ServiceException
service in interface Serviceableservice in class StaticFileImportsClientSideElementServiceExceptionpublic Map<String,Object> deleteLogs(List<String> files) throws ProcessingException, IOException
files - the files to deleteIOException - if an error occurred during deletionProcessingException - if an error occurred during deletionpublic Map<String,Object> purgeLogs() throws ProcessingException
ProcessingException - if an exception occurs while processing the deletionprivate boolean _deleteFile(String fileLocation) throws IOException, ProcessingException
IOExceptionProcessingExceptionpublic Map<String,Object> changeLogLevel(String level, String category)
level - the selected levelcategory - the selected categoryprivate void _changeLogLevel(LoggerRepository loggerRepository, String category, String mode)