Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR Attempted to append to closed appender #12

Closed
mcweba opened this issue Apr 4, 2016 · 0 comments
Closed

ERROR Attempted to append to closed appender #12

mcweba opened this issue Apr 4, 2016 · 0 comments
Labels

Comments

@mcweba
Copy link
Collaborator

mcweba commented Apr 4, 2016

The request logging feature seems to have a bug when a special combination of filter values (url, method, destination) are configured in the logging resource.

The following configuration defines a filter for an url and the destination where to log the requests. This configuration works without any problems:

{
  "headers": [],
  "payload": {
    "destinations": [
      {
        "name": "requestLog",
        "type": "file",
        "file": "requestsTest.log"
      }
    ],
    "filters": [
      {
        "url": "/playground/server/tests/exp/.*",
        "destination": "requestLog"
      }
    ]
  }
}

The following configuration also works without problems. This configuration again defines an url and the method (PUT) to log. The destination is configured with the system property org.swisspush.logging.dir:

{
  "headers": [],
  "payload": {
    "destinations": [
      {
        "name": "requestLog",
        "type": "file",
        "file": "requestsTest.log"
      }
    ],
    "filters": [
      {
        "url": "/playground/server/tests/exp/.*",
        "method": "PUT"
      }
    ]
  }
}

Not working configuration

When using all three filter values (url, method and destination), the requests are not written to the logfile and the following error occurs:

log4j:ERROR Attempted to append to closed appender named [requestLog].

An example of such a logging resource would be:

{
  "headers": [],
  "payload": {
    "destinations": [
      {
        "name": "requestLog",
        "type": "file",
        "file": "requestsTest.log"
      }
    ],
    "filters": [
      {
        "url": "/playground/server/tests/exp/.*",
        "method": "PUT",
        "destination": "requestLog"
      }
    ]
  }
}
@mcweba mcweba added the bug label Apr 4, 2016
@mcweba mcweba closed this as completed in 1f8ded5 Jun 16, 2016
roggerj pushed a commit to roggerj/gateleen that referenced this issue Sep 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant