You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2019/04/11 09:19:05 UTC
[uima-uimafit] branch release/3.0.0 updated: No Jira - Elaborate
migration guide and minor adjustments
This is an automated email from the ASF dual-hosted git repository.
rec pushed a commit to branch release/3.0.0
in repository https://gitbox.apache.org/repos/asf/uima-uimafit.git
The following commit(s) were added to refs/heads/release/3.0.0 by this push:
new b103b05 No Jira - Elaborate migration guide and minor adjustments
b103b05 is described below
commit b103b055f4dfd93ac1479a01c9dd7356d18a8625
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Thu Apr 11 11:18:58 2019 +0200
No Jira - Elaborate migration guide and minor adjustments
- Mention removal of deprecated methods and changes to logging system in migration guide.
- Adjust example code to use proper calls to logging
- Change link to source code repo in README from Apache SVN to GitHub
---
README | 2 +-
uimafit-docbook/src/docbook/tools.uimafit.migration.xml | 17 +++++++++++++++++
.../fit/examples/tutorial/ex2/RoomNumberAnnotator.java | 3 +--
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/README b/README
index 80731d0..90fd2ec 100644
--- a/README
+++ b/README
@@ -59,7 +59,7 @@ Availability
uimaFIT is licensed under the Apache License 2.0 and is available from the Apache UIMA project:
http://uima.apache.org
- http://svn.apache.org/repos/asf/uima/uimafit
+ https://github.com/apache/uima-uimafit
uimaFIT is available via Maven Central. If you use Maven for your build environment, then you can
add uimaFIT as a dependency to your pom.xml file with the following:
diff --git a/uimafit-docbook/src/docbook/tools.uimafit.migration.xml b/uimafit-docbook/src/docbook/tools.uimafit.migration.xml
index 12f8473..73ca3c5 100644
--- a/uimafit-docbook/src/docbook/tools.uimafit.migration.xml
+++ b/uimafit-docbook/src/docbook/tools.uimafit.migration.xml
@@ -49,6 +49,23 @@
<literal>selectSingleFS</literal></para>
</formalpara>
<formalpara>
+ <title>Removal of deprecated methods</title>
+ <para>Various methods that were deprecated in uimaFIT 2.4.0 or earlier have been removed in
+ this release. For details, please refer to the <literal>api-change-report.html</literal>
+ file included in the release.</para>
+ </formalpara>
+ <formalpara>
+ <title>Changes to logging</title>
+ <para>UIMA v3 has is using SLF4J. As a consequence, the <literal>ExtendedLogger</literal>
+ which uimaFIT had returned on calls to <literal>getLogger()</literal> has been removed
+ and instead the regular UIMA v3 logger class is returned which offers methods quite compatible
+ with what <literal>ExtendedLogger</literal> offered before. However, it is recommended
+ that you go through all your logging calls and replace calls which use string concatenation
+ to construct the logging message with corresponding calls using placeholders. For example,
+ replace <literal>getLogger().error("Cannot access " + filename, exception);</literal> with
+ <literal>getLogger().error("Cannot access {}", filename, exception);</literal>.</para>
+ </formalpara>
+ <formalpara>
<title>Version requirements</title>
<para>Depends on UIMA 3.0.2, Spring Framework 4.3.22 and Java 8.</para>
</formalpara>
diff --git a/uimafit-examples/src/main/java/org/apache/uima/fit/examples/tutorial/ex2/RoomNumberAnnotator.java b/uimafit-examples/src/main/java/org/apache/uima/fit/examples/tutorial/ex2/RoomNumberAnnotator.java
index feeb4b3..2c76941 100644
--- a/uimafit-examples/src/main/java/org/apache/uima/fit/examples/tutorial/ex2/RoomNumberAnnotator.java
+++ b/uimafit-examples/src/main/java/org/apache/uima/fit/examples/tutorial/ex2/RoomNumberAnnotator.java
@@ -28,7 +28,6 @@ import org.apache.uima.fit.descriptor.ConfigurationParameter;
import org.apache.uima.fit.descriptor.TypeCapability;
import org.apache.uima.fit.examples.tutorial.type.RoomNumber;
import org.apache.uima.jcas.JCas;
-import org.apache.uima.util.Level;
/**
* This class demonstrates annotating member variables with the @ConfigurationParameter annotation.
@@ -74,7 +73,7 @@ public class RoomNumberAnnotator extends JCasAnnotator_ImplBase {
RoomNumber annotation = new RoomNumber(aJCas, matcher.start(), matcher.end());
annotation.setBuilding(mLocations[i]);
annotation.addToIndexes();
- getContext().getLogger().log(Level.FINEST, "Found: " + annotation);
+ getLogger().debug("Found: {}", annotation);
}
}
}