You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@uima.apache.org by Marshall Schor <ms...@schor.com> on 2017/03/01 15:11:56 UTC

Re: merging logging level design points - uimaFIT Extended Logger

After thinking about this overnight, it occurred to me that uv3 could simply
conform to what's been out there already in uimaFIT, while adding some marker
support.

This would preserve backwards compatibility with users of uimaFIT.

Therefore, I plan to change the uv3 level mapping to:

SEVERE  <-> ERROR
WARNING <-> WARN
INFO    <-> INFO
CONFIG  <-> INFO   (distingushed by a marker, UIMA_MARKER_CONFIG)
*FINE    <-> TRACE  
*FINER   <-> DEBUG  
*FINEST  <-> DEBUG  (distingushed by a marker, UIMA_MARKER_DEBUG) 

This will match what uimaFIT does, while still allowing support for CONFIG and FINEST via markers.

-Marshall 


On 2/28/2017 6:02 PM, Marshall Schor wrote:
> The uv3 Logger now implements a big set of specialized loggers, all of the slf4j
> interface, plus a few from log4j that support Java 8 lambda arguments (Supplier).
>
> The uimaFIT ExtendedLogger implemented a few of these "named" logging variants.
>
> The conventions used are slightly different.
>
> UV3:  the SEVERE/WARNING/INFO/CONFIG/FINE/FINER/FINEST were mapped:
>
> SEVERE  <-> ERROR
> WARNING <-> WARN
> INFO    <-> INFO
> CONFIG  <-> INFO   (distingushed by a marker, UIMA_MARKER_CONFIG)
> FINE    <-> TRACE  (distingushed by a marker, UIMA_MARKER_FINE) 
> FINER   <-> TRACE  (distingushed by a marker, UIMA_MARKER_FINER) 
> FINEST  <-> DEBUG
>
> while the uimaFIT chose:
>
> SEVERE  <-> ERROR
> WARNING <-> WARN
> INFO    <-> INFO
> CONFIG  <-> not available
> FINE    <-> TRACE
> FINER   <-> DEBUG
> FINEST  <-> not available
>
> Although we could keep the uimaFIT ExtendedLogger as is, this could have strange
> behavior for users, in that the uimaFIT methods would have one mapping, and the
> slf4j style ones would have another.  For example:
>
> logger.debug(Object param)  // a uimaFIT call
> logger.debug(String msg)         // a slf4j style call
> logger.debug(String msg, Object parm)  // another slf4j style call
>
> See https://www.slf4j.org/apidocs/org/slf4j/Logger.html for all of the calls...
>
> The slf4j calls would correspond to FINEST, while the uimaFIT ones would
> correspond to FINER.
>
> I'm wondering what's the best way to align these?
>
> -Marshall
>
>


Re: merging logging level design points - uimaFIT Extended Logger

Posted by Marshall Schor <ms...@schor.com>.
oops, reverse debug and trace.  The corrected level mapping is

SEVERE  <-> ERROR
WARNING <-> WARN
INFO    <-> INFO
CONFIG  <-> INFO   (distingushed by a marker, UIMA_MARKER_CONFIG)
*FINE    <-> DEBUG  
*FINER   <-> TRACE  
*FINEST  <-> TRACE  (distingushed by a marker, UIMA_MARKER_FINEST) 

-Marshall

On 3/1/2017 10:11 AM, Marshall Schor wrote:
> After thinking about this overnight, it occurred to me that uv3 could simply
> conform to what's been out there already in uimaFIT, while adding some marker
> support.
>
> This would preserve backwards compatibility with users of uimaFIT.
>
> Therefore, I plan to change the uv3 level mapping to:
>
> SEVERE  <-> ERROR
> WARNING <-> WARN
> INFO    <-> INFO
> CONFIG  <-> INFO   (distingushed by a marker, UIMA_MARKER_CONFIG)
> *FINE    <-> TRACE  
> *FINER   <-> DEBUG  
> *FINEST  <-> DEBUG  (distingushed by a marker, UIMA_MARKER_DEBUG) 
>
> This will match what uimaFIT does, while still allowing support for CONFIG and FINEST via markers.
>
> -Marshall 
>
>
> On 2/28/2017 6:02 PM, Marshall Schor wrote:
>> The uv3 Logger now implements a big set of specialized loggers, all of the slf4j
>> interface, plus a few from log4j that support Java 8 lambda arguments (Supplier).
>>
>> The uimaFIT ExtendedLogger implemented a few of these "named" logging variants.
>>
>> The conventions used are slightly different.
>>
>> UV3:  the SEVERE/WARNING/INFO/CONFIG/FINE/FINER/FINEST were mapped:
>>
>> SEVERE  <-> ERROR
>> WARNING <-> WARN
>> INFO    <-> INFO
>> CONFIG  <-> INFO   (distingushed by a marker, UIMA_MARKER_CONFIG)
>> FINE    <-> TRACE  (distingushed by a marker, UIMA_MARKER_FINE) 
>> FINER   <-> TRACE  (distingushed by a marker, UIMA_MARKER_FINER) 
>> FINEST  <-> DEBUG
>>
>> while the uimaFIT chose:
>>
>> SEVERE  <-> ERROR
>> WARNING <-> WARN
>> INFO    <-> INFO
>> CONFIG  <-> not available
>> FINE    <-> TRACE
>> FINER   <-> DEBUG
>> FINEST  <-> not available
>>
>> Although we could keep the uimaFIT ExtendedLogger as is, this could have strange
>> behavior for users, in that the uimaFIT methods would have one mapping, and the
>> slf4j style ones would have another.  For example:
>>
>> logger.debug(Object param)  // a uimaFIT call
>> logger.debug(String msg)         // a slf4j style call
>> logger.debug(String msg, Object parm)  // another slf4j style call
>>
>> See https://www.slf4j.org/apidocs/org/slf4j/Logger.html for all of the calls...
>>
>> The slf4j calls would correspond to FINEST, while the uimaFIT ones would
>> correspond to FINER.
>>
>> I'm wondering what's the best way to align these?
>>
>> -Marshall
>>
>>
>