[jboss-jira] [JBoss JIRA] Commented: (AS7-1706) Handler change-file command fails every other time.

Stan Silvert (JIRA) jira-events at lists.jboss.org
Tue Sep 6 20:26:26 EDT 2011


    [ https://issues.jboss.org/browse/AS7-1706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12626620#comment-12626620 ] 

Stan Silvert commented on AS7-1706:
-----------------------------------

There are several problems with HandlerFileChange.java. 

When updating the model, it doesn't account for the case when the user doesn't specify a new value for relative-to. So if I'm only changing the file name it will set relative-to to undefined. 

For updating the runtime, I'm not sure what this code was trying to do. It adds a new AbstractServiceListener to the ServiceController. This listener defines (overrides?) the serviceRemoved() method which doesn't exist in AbstractServiceListener. 

I'm wondering if the change-file command is even needed. It seems to me that this functionality should be rolled into the update-properties command if possible. That would certainly make it a lot easier to deal with in the console.

> Handler change-file command fails every other time.
> ---------------------------------------------------
>
>                 Key: AS7-1706
>                 URL: https://issues.jboss.org/browse/AS7-1706
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Logging
>    Affects Versions: 7.0.1.Final
>            Reporter: Stan Silvert
>            Assignee: Stan Silvert
>
> The change-file command will fail with every other request.
> {code}
> [standalone at localhost:9999 periodic-rotating-file-handler=FILE] :read-resource
> {
>     "outcome" => "success",
>     "result" => {
>         "append" => true,
>         "autoflush" => true,
>         "encoding" => undefined,
>         "file" => {
>             "path" => "server3.log",
>             "relative-to" => undefined
>         },
>         "formatter" => "%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n",
>         "level" => "INFO",
>         "suffix" => ".yyyy-MM-dd"
>     }
> }
> [standalone at localhost:9999 periodic-rotating-file-handler=FILE] :change-file(path=server4.log)
> {
>     "outcome" => "failed",
>     "failure-description" => "Operation handler failed to complete",
>     "rolled-back" => true
> }
> [standalone at localhost:9999 periodic-rotating-file-handler=FILE] :change-file(path=server4.log)
> {"outcome" => "success"}
> [standalone at localhost:9999 periodic-rotating-file-handler=FILE] :read-resource
> {
>     "outcome" => "success",
>     "result" => {
>         "append" => true,
>         "autoflush" => true,
>         "encoding" => "UTF-8",
>         "file" => {
>             "path" => "server4.log",
>             "relative-to" => undefined
>         },
>         "formatter" => "%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n",
>         "level" => "INFO",
>         "suffix" => ".yyyy-MM-dd"
>     }
> }
> {code}
> On the server console, you see:
> {code}
> 18:06:22,179 INFO  [org.jboss.as.controller] (MSC service thread 1-5) Service status report
>    New missing/unsatisfied dependencies:
>       service jboss.logging.handler-file.FILE (missing)
> 18:06:27,050 INFO  [org.jboss.as.controller] (pool-2-thread-53) Service status report
>    Newly corrected services:
>       service jboss.logging.handler-file.FILE (now available)
> {code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list