{"action":"created","issue":{"url":"https://api.github.com/repos/logstash/logstash-logback-encoder/issues/152","repository_url":"https://api.github.com/repos/logstash/logstash-logback-encoder","labels_url":"https://api.github.com/repos/logstash/logstash-logback-encoder/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/logstash/logstash-logback-encoder/issues/152/comments","events_url":"https://api.github.com/repos/logstash/logstash-logback-encoder/issues/152/events","html_url":"https://github.com/logstash/logstash-logback-encoder/issues/152","id":136729717,"number":152,"title":"I can not use PatternLayoutEncoder and LogstashEncoder together","user":{"login":"Yancey1989","id":1426912,"avatar_url":"https://avatars.githubusercontent.com/u/1426912?v=3","gravatar_id":"","url":"https://api.github.com/users/Yancey1989","html_url":"https://github.com/Yancey1989","followers_url":"https://api.github.com/users/Yancey1989/followers","following_url":"https://api.github.com/users/Yancey1989/following{/other_user}","gists_url":"https://api.github.com/users/Yancey1989/gists{/gist_id}","starred_url":"https://api.github.com/users/Yancey1989/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Yancey1989/subscriptions","organizations_url":"https://api.github.com/users/Yancey1989/orgs","repos_url":"https://api.github.com/users/Yancey1989/repos","events_url":"https://api.github.com/users/Yancey1989/events{/privacy}","received_events_url":"https://api.github.com/users/Yancey1989/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-26T15:39:34Z","updated_at":"2016-02-26T17:47:46Z","closed_at":null,"body":"Here is my logback.xml,\r\n'''\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<configuration>\r\n    <appender name=\"stash\" class=\"net.logstash.logback.appender.LogstashTcpSocketAppender\">\r\n        <destination>127.0.0.1:4561</destination>\r\n\r\n        <encoder class=\"net.logstash.logback.encoder.LogstashEncoder\" />\r\n    </appender>\r\n    <appender name=\"FILE\" class=\"ch.qos.logback.core.FileAppender\">\r\n        <file>app.log</file>\r\n\r\n        <encoder class=\"ch.qos.logback.classic.encoder.PatternLayoutEncoder\">\r\n            <Pattern>\r\n                %d{yyyy-MM-dd HH:mm:ss} [%thread] %level %logger{35} - %msg%n\r\n            </Pattern>\r\n        </encoder>\r\n    </appender>\r\n    <root level=\"DEBUG\">\r\n        <appender-ref ref=\"stash\" />\r\n        <appender-ref ref=\"FILE\" />\r\n    </root>\r\n\r\n</configuration>\r\n'''\r\nthere are two appender, LogstashTcpSocketAppender and FileAppender. \r\nWith this config file, my logstash can not received the message,  when I fix FileAppender->encoder to LogstashEncoder, it will be ok, it seems like there only can be one encoder in one config file."},"comment":{"url":"https://api.github.com/repos/logstash/logstash-logback-encoder/issues/comments/189389434","html_url":"https://github.com/logstash/logstash-logback-encoder/issues/152#issuecomment-189389434","issue_url":"https://api.github.com/repos/logstash/logstash-logback-encoder/issues/152","id":189389434,"user":{"login":"osigida","id":6461608,"avatar_url":"https://avatars.githubusercontent.com/u/6461608?v=3","gravatar_id":"","url":"https://api.github.com/users/osigida","html_url":"https://github.com/osigida","followers_url":"https://api.github.com/users/osigida/followers","following_url":"https://api.github.com/users/osigida/following{/other_user}","gists_url":"https://api.github.com/users/osigida/gists{/gist_id}","starred_url":"https://api.github.com/users/osigida/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osigida/subscriptions","organizations_url":"https://api.github.com/users/osigida/orgs","repos_url":"https://api.github.com/users/osigida/repos","events_url":"https://api.github.com/users/osigida/events{/privacy}","received_events_url":"https://api.github.com/users/osigida/received_events","type":"User","site_admin":false},"created_at":"2016-02-26T17:47:46Z","updated_at":"2016-02-26T17:47:46Z","body":"this one looks ok for me \r\n\r\n```\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<configuration>\r\n<appender name=\"file\" class=\"ch.qos.logback.core.rolling.RollingFileAppender\">\r\n    <file>/log.log</file>\r\n    <encoder class=\"ch.qos.logback.classic.encoder.PatternLayoutEncoder\">\r\n        <Pattern>%d{yyyy-MM-dd_HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>\r\n    </encoder>\r\n    <rollingPolicy class=\"ch.qos.logback.core.rolling.TimeBasedRollingPolicy\">\r\n        <fileNamePattern>/log.%d{yyyy-MM-dd}.log.gz</fileNamePattern>\r\n        <maxHistory>7</maxHistory>\r\n        <cleanHistoryOnStart>true</cleanHistoryOnStart>\r\n    </rollingPolicy>\r\n</appender>\r\n\r\n<appender name=\"stash\" class=\"net.logstash.logback.appender.LogstashTcpSocketAppender\">\r\n    <destination>HOST:PORT</destination>\r\n    <encoder class=\"net.logstash.logback.encoder.LogstashEncoder\" />\r\n</appender>\r\n\r\n<root level=\"INFO\">\r\n    <appender-ref ref=\"file\" />\r\n    <appender-ref ref=\"stash\" />\r\n</root>\r\n</configuration>\r\n```"}}