[ 
https://issues.apache.org/jira/browse/FELIX-1789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12784309#action_12784309
 ] 

Richard S. Hall commented on FELIX-1789:
----------------------------------------

The way File Install handles logging is not very good. It doesn't itself have a 
log level, it simply uses a single flag (felix.fileinstall.debug) to indicate 
whether or not it should print exception stack traces for all messages and it 
doesn't actually assign a log level to a message, which means there really is 
no way to control which messages get logged.

I have attached a patch that has deleted the "felix.fileinstall.debug" property 
(since it doesn't make much sense) and have added a 
"felix.fileinstall.log.level" property, which controls which level of messages 
get logged. I have then modified the logging methods to associate a log level 
with the message being logged. Thus, messages only get logged if 
felix.fileinstall.log.level is greater than zero (i.e., enabled) and if the 
message log level is less than or equal to the configured log level.

This is an improvement, but logging is still pretty ugly since it is based on a 
static approach. Seems like it be cleaner to give each DirectoryWatcher its own 
logger which is properly configured for it, but the patch is better than 
nothing.

Two issues:

1. Some people may care that I deleted the old property, but really it served 
little purpose.
2. I wasn't sure which log level to assign to the various messages, so someone 
may want to check that.

Thoughts?

> FileInstall is too verbose
> --------------------------
>
>                 Key: FELIX-1789
>                 URL: https://issues.apache.org/jira/browse/FELIX-1789
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions: fileinstall-2.0.0
>         Environment: generic
>            Reporter: Sahoo
>             Fix For: fileinstall-2.0.6
>
>         Attachments: FELIX-1789.txt
>
>
> GlassFish users have commented that FileInstall is too verbose. They suggest 
> the initial configuration related messages to be moved to debug level.
> e.g.,
> INFO: {felix.fileinstall.poll (ms) = 5000, felix.fileinstall.dir = 
> /space/ss141213/WS/gf/v3/publish/glassfishv3/glassfish/domains/domain1/autodeploy/bundles,
>  felix.fileinstall.debug = 1, felix.fileinstall.bundles.new.start = true, 
> felix.fileinstall.tmpdir = /tmp/fileinstall, felix.fileinstall.filter = null}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to