Permalink
Show file tree
Hide file tree
22 changes: 22 additions & 0 deletions
22
xwiki-platform-core/xwiki-platform-logging/xwiki-platform-logging-script/pom.xml
31 changes: 31 additions & 0 deletions
31
xwiki-platform-core/xwiki-platform-logging/xwiki-platform-logging-ui/pom.xml
25 changes: 17 additions & 8 deletions
25
...wiki-platform-logging/xwiki-platform-logging-ui/src/main/resources/XWiki/LoggingAdmin.xml
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
XWIKI-20291: Improved translations of logging administration
- Loading branch information
1 parent
3376f78
commit 49fdfd6
Showing
8 changed files
with
409 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
...orm-logging-script/src/test/java/org/xwiki/logging/LoggingScriptServiceComponentList.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| /* | ||
| * See the NOTICE file distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This is free software; you can redistribute it and/or modify it | ||
| * under the terms of the GNU Lesser General Public License as | ||
| * published by the Free Software Foundation; either version 2.1 of | ||
| * the License, or (at your option) any later version. | ||
| * | ||
| * This software is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| * Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public | ||
| * License along with this software; if not, write to the Free | ||
| * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
| * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
| */ | ||
| package org.xwiki.logging; | ||
|
|
||
| import java.lang.annotation.Documented; | ||
| import java.lang.annotation.Inherited; | ||
| import java.lang.annotation.Retention; | ||
| import java.lang.annotation.Target; | ||
|
|
||
| import org.xwiki.logging.script.LoggingScriptService; | ||
| import org.xwiki.test.annotation.ComponentList; | ||
|
|
||
| import static java.lang.annotation.ElementType.ANNOTATION_TYPE; | ||
| import static java.lang.annotation.ElementType.METHOD; | ||
| import static java.lang.annotation.ElementType.TYPE; | ||
| import static java.lang.annotation.RetentionPolicy.RUNTIME; | ||
|
|
||
| /** | ||
| * Component list for {@link LoggingScriptService}. | ||
| * | ||
| * @version $Id$ | ||
| * @since 13.10.11 | ||
| * @since 14.4.7 | ||
| * @since 14.10RC1 | ||
| */ | ||
| @Documented | ||
| @Retention(RUNTIME) | ||
| @Target({ TYPE, METHOD, ANNOTATION_TYPE }) | ||
| @ComponentList({ | ||
| LoggingScriptService.class, | ||
| NullLoggerManager.class | ||
| }) | ||
| @Inherited | ||
| public @interface LoggingScriptServiceComponentList | ||
| { | ||
| } |
66 changes: 66 additions & 0 deletions
66
...ging/xwiki-platform-logging-script/src/test/java/org/xwiki/logging/NullLoggerManager.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| /* | ||
| * See the NOTICE file distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This is free software; you can redistribute it and/or modify it | ||
| * under the terms of the GNU Lesser General Public License as | ||
| * published by the Free Software Foundation; either version 2.1 of | ||
| * the License, or (at your option) any later version. | ||
| * | ||
| * This software is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| * Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public | ||
| * License along with this software; if not, write to the Free | ||
| * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
| * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
| */ | ||
| package org.xwiki.logging; | ||
|
|
||
| import java.util.Collection; | ||
|
|
||
| import org.slf4j.Logger; | ||
| import org.xwiki.observation.EventListener; | ||
|
|
||
| /** | ||
| * Null logger manager, to be overridden if need be. | ||
| * | ||
| * @version $Id$ | ||
| * @since 13.10.11 | ||
| * @since 14.4.7 | ||
| * @since 14.10RC1 | ||
| */ | ||
| public class NullLoggerManager implements LoggerManager | ||
| { | ||
| @Override | ||
| public void pushLogListener(EventListener listener) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| @Override | ||
| public EventListener popLogListener() | ||
| { | ||
| return null; | ||
| } | ||
|
|
||
| @Override | ||
| public void setLoggerLevel(String loggerName, LogLevel level) | ||
| { | ||
|
|
||
| } | ||
|
|
||
| @Override | ||
| public LogLevel getLoggerLevel(String loggerName) | ||
| { | ||
| return null; | ||
| } | ||
|
|
||
| @Override | ||
| public Collection<Logger> getLoggers() | ||
| { | ||
| return null; | ||
| } | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
...-logging/xwiki-platform-logging-ui/src/main/resources/XWiki/Logging/Code/Translations.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| <?xml version="1.1" encoding="UTF-8"?> | ||
|
|
||
| <!-- | ||
| * See the NOTICE file distributed with this work for additional | ||
| * information regarding copyright ownership. | ||
| * | ||
| * This is free software; you can redistribute it and/or modify it | ||
| * under the terms of the GNU Lesser General Public License as | ||
| * published by the Free Software Foundation; either version 2.1 of | ||
| * the License, or (at your option) any later version. | ||
| * | ||
| * This software is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| * Lesser General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Lesser General Public | ||
| * License along with this software; if not, write to the Free | ||
| * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
| * 02110-1301 USA, or see the FSF site: http://www.fsf.org. | ||
| --> | ||
|
|
||
| <xwikidoc version="1.5" reference="XWiki.Logging.Code.Translations" locale=""> | ||
| <web>XWiki.Logging.Code</web> | ||
| <name>Translations</name> | ||
| <language/> | ||
| <defaultLanguage>en</defaultLanguage> | ||
| <translation>0</translation> | ||
| <creator>xwiki:XWiki.Admin</creator> | ||
| <parent>WebHome</parent> | ||
| <author>xwiki:XWiki.Admin</author> | ||
| <contentAuthor>xwiki:XWiki.Admin</contentAuthor> | ||
| <version>1.1</version> | ||
| <title>Translations</title> | ||
| <comment/> | ||
| <minorEdit>false</minorEdit> | ||
| <syntaxId>plain/1.0</syntaxId> | ||
| <hidden>true</hidden> | ||
| <content>logging.admin.unsetLevel.success=Logger "{0}" level has been unset. | ||
| logging.admin.setLevel.success=Logger "{0}" level has been set to "{1}". | ||
| logging.admin.setLevel.error=Failed to set log level: the logger "{0}" doesn't exist.</content> | ||
| <object> | ||
| <name>XWiki.Logging.Code.Translations</name> | ||
| <number>0</number> | ||
| <className>XWiki.TranslationDocumentClass</className> | ||
| <guid>fc29bfac-011a-4573-80ba-3f5713f1e847</guid> | ||
| <class> | ||
| <name>XWiki.TranslationDocumentClass</name> | ||
| <customClass/> | ||
| <customMapping/> | ||
| <defaultViewSheet/> | ||
| <defaultEditSheet/> | ||
| <defaultWeb/> | ||
| <nameField/> | ||
| <validationScript/> | ||
| <scope> | ||
| <cache>0</cache> | ||
| <disabled>0</disabled> | ||
| <displayType>select</displayType> | ||
| <freeText>forbidden</freeText> | ||
| <largeStorage>0</largeStorage> | ||
| <multiSelect>0</multiSelect> | ||
| <name>scope</name> | ||
| <number>1</number> | ||
| <prettyName>Scope</prettyName> | ||
| <relationalStorage>0</relationalStorage> | ||
| <separator> </separator> | ||
| <separators>|, </separators> | ||
| <size>1</size> | ||
| <unmodifiable>0</unmodifiable> | ||
| <values>GLOBAL|WIKI|USER|ON_DEMAND</values> | ||
| <classType>com.xpn.xwiki.objects.classes.StaticListClass</classType> | ||
| </scope> | ||
| </class> | ||
| <property> | ||
| <scope>WIKI</scope> | ||
| </property> | ||
| </object> | ||
| </xwikidoc> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.