You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@uima.apache.org by Sean K <sk...@gmail.com> on 2012/04/19 02:53:27 UTC
logging with UIMA
Hi,
I am new to UIMA.
I am using the UIMA Simple Server configured in a tomcat web application.
http://uima.apache.org/d/uima-addons-current/SimpleServer/simpleServerUserGuide.html
When I go to the web page using this url:
http://localhost:8080/uimaweb/uima?mode=form
I can enter some text. I replaced the WhitespaceTokenizer.pear with
another tokenizer (the roomNumberAnnotator.pear from another
tutorial).
I press submit and response <result> </result> just contains the raw
original text.
I have tried to put either a logging.properties or log4j.properties
into my web app's WEB-INF/classes and set the level to SEVERE or
DEBUGGING. but I dont see the logs entries made by UIMA.
This java logging is confusing too.
How do you generate logs in a tomcat web app with UIMA?
### this is the log4j.properties ### below this is the logging.properties.
# Root logger option
log4j.rootLogger=DEBUG, stdout
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
# Root logger option
log4j.rootLogger=DEBUG, file, stdout
# Direct log messages to a log file
log4j.appender.file=org.apache.log4j.RollingFileAppender
log4j.appender.file.File=log/uima.log
log4j.appender.file.MaxFileSize=1MB
log4j.appender.file.MaxBackupIndex=1
log4j.appender.file.layout=org.apache.log4j.PatternLayout
log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
# Direct log messages to stdout
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.Target=System.out
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
#### logging.properties
#
# Specify the handlers to create in the root logger
# (all loggers are children of the root logger)
# The following creates two handlers
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
# Set the default logging level for the root logger
.level = DEBUG
# Set the default logging level for new ConsoleHandler instances
java.util.logging.ConsoleHandler.level = DEBUG
# Set the default logging level for new FileHandler instances
java.util.logging.FileHandler.level = DEBUG
java.util.logging.FileHandler.pattern=%h/uima-logging%u.log
# Limiting size of output file in bytes:
java.util.logging.FileHandler.limit=50000
# Number of output files to cycle through, by appending an
# integer to the base file name:
java.util.logging.FileHandler.count=1
# Style of output (Simple or XML):
java.util.logging.FileHandler.formatter=java.util.logging.SimpleFormatter
# Set the default formatter for new ConsoleHandler instances
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
java.util.logging.ConsoleHandler.level=SEVERE
# Set the default logging level for the logger named com.mycompany
org.apache.uima.level = DEBUG