[ 
https://issues.apache.org/jira/browse/LOG4J2-789?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14105991#comment-14105991
 ] 

Bijith Kumar commented on LOG4J2-789:
-------------------------------------

Thanks Ralph. I made some progress today.
Actually, Flume uses SLF4j. So I configured log4j-slf4j binding (log4j2) and 
after some struggle with dependency cleanups, I was able to get some agent logs 
to the file (given below).
However, the above (startup) logs still doesn't show up. Now it has disappeared 
from console as well.
My log4j2 configuration now is 
<Root level="ALL">
        <AppenderRef ref="applicationFile"/>
</Root>

[INFO ] 2014-08-21 14:15:51,399 net.nativo.flume.test.DataTest: From 
application!!!!!!!!!!!!!!!!!!
[DEBUG] 2014-08-21 14:15:54,331 org.apache.flume.lifecycle.LifecycleSupervisor: 
checking process:FileChannel 
channel-flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0 { dataDirs: 
[flumedata/file-channel/data] } supervisoree:{ status:{ lastSeen:1408655751330 
lastSeenState:START desiredState:START firstSeen:1408655751330 failures:0 
discard:false error:false } 
policy:org.apache.flume.lifecycle.LifecycleSupervisor$SupervisorPolicy$AlwaysRestartPolicy@5fb47871
 }
[DEBUG] 2014-08-21 14:15:54,331 org.apache.flume.lifecycle.LifecycleSupervisor: 
Status check complete
[DEBUG] 2014-08-21 14:15:54,331 org.apache.flume.lifecycle.LifecycleSupervisor: 
checking process:SinkRunner: { 
policy:org.apache.flume.sink.DefaultSinkProcessor@1e059ae6 counterGroup:{ 
name:null counters:{runner.backoffs.consecutive=2, runner.backoffs=2} } } 
supervisoree:{ status:{ lastSeen:1408655751331 lastSeenState:START 
desiredState:START firstSeen:1408655751331 failures:0 discard:false error:false 
} 
policy:org.apache.flume.lifecycle.LifecycleSupervisor$SupervisorPolicy$AlwaysRestartPolicy@414f73cd
 }
[DEBUG] 2014-08-21 14:15:54,331 org.apache.flume.lifecycle.LifecycleSupervisor: 
Status check complete
[DEBUG] 2014-08-21 14:15:54,331 org.apache.flume.lifecycle.LifecycleSupervisor: 
checking process:EventDrivenSourceRunner: { 
source:org.apache.flume.agent.embedded.EmbeddedSource{name:source-flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0,state:START}
 } supervisoree:{ status:{ lastSeen:1408655751331 lastSeenState:START 
desiredState:START firstSeen:1408655751331 failures:0 discard:false error:false 
} 
policy:org.apache.flume.lifecycle.LifecycleSupervisor$SupervisorPolicy$AlwaysRestartPolicy@473bb93a
 }
[DEBUG] 2014-08-21 14:15:54,332 org.apache.flume.lifecycle.LifecycleSupervisor: 
Status check complete
[DEBUG] 2014-08-21 14:15:57,332 org.apache.flume.lifecycle.LifecycleSupervisor: 
checking process:SinkRunner: { 
policy:org.apache.flume.sink.DefaultSinkProcessor@1e059ae6 counterGroup:{ 
name:null counters:{runner.backoffs.consecutive=3, runner.backoffs=3} } } 
supervisoree:{ status:{ lastSeen:1408655754331 lastSeenState:START 
desiredState:START firstSeen:1408655751331 failures:0 discard:false error:false 
} 
policy:org.apache.flume.lifecycle.LifecycleSupervisor$SupervisorPolicy$AlwaysRestartPolicy@414f73cd
 }
[DEBUG] 2014-08-21 14:15:57,332 org.apache.flume.lifecycle.LifecycleSupervisor: 
checking process:FileChannel 
channel-flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0 { dataDirs: 
[flumedata/file-channel/data] } supervisoree:{ status:{ lastSeen:1408655754331 
lastSeenState:START desiredState:START firstSeen:1408655751330 failures:0 
discard:false error:false } 
policy:org.apache.flume.lifecycle.LifecycleSupervisor$SupervisorPolicy$AlwaysRestartPolicy@5fb47871
 }
[DEBUG] 2014-08-21 14:15:57,332 org.apache.flume.lifecycle.LifecycleSupervisor: 
Status check complete
[DEBUG] 2014-08-21 14:15:57,332 org.apache.flume.lifecycle.LifecycleSupervisor: 
Status check complete

> Where can I view the embedded flume agent startup logs
> ------------------------------------------------------
>
>                 Key: LOG4J2-789
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-789
>             Project: Log4j 2
>          Issue Type: Question
>          Components: Flume Appender
>    Affects Versions: 2.0-rc2
>            Reporter: Bijith Kumar
>
> Question is about the INFO/ERROR statements logged by the embedded flume 
> agent during startup.
> When running from eclipse I am able to see these logs in the console. 
> However, when deployed in Tomcat, the log doesn't appear in application or 
> catalina.out logs. I tried adding the below configuration in my log4j2.xml 
> but that didn't work either
> <Logger name="org.apache.flume" level="INFO">
>                       <AppenderRef ref="applicationFile" />
> </Logger>
> Just to make it clear, I am talking about the below logs (i.e.the embedded 
> agent startup logs)
> 14/08/20 16:37:12 INFO conf.FlumeConfiguration: Processing:agent1
> 14/08/20 16:37:12 INFO conf.FlumeConfiguration: Processing:agent1
> 14/08/20 16:37:12 INFO conf.FlumeConfiguration: Processing:agent1
> 14/08/20 16:37:12 INFO conf.FlumeConfiguration: Processing:agent1
> 14/08/20 16:37:12 INFO conf.FlumeConfiguration: Processing:agent1
> 14/08/20 16:37:12 INFO conf.FlumeConfiguration: Added sinks: agent1 Agent: 
> flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0
> 14/08/20 16:37:12 INFO conf.FlumeConfiguration: Post-validation flume 
> configuration contains configuration for agents: 
> [flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0]
> 14/08/20 16:37:12 INFO node.AbstractConfigurationProvider: Creating channels
> 14/08/20 16:37:12 INFO channel.DefaultChannelFactory: Creating instance of 
> channel channel-flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0 type file
> 14/08/20 16:37:12 INFO node.AbstractConfigurationProvider: Created channel 
> channel-flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0
> 14/08/20 16:37:12 INFO source.DefaultSourceFactory: Creating instance of 
> source source-flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0, type 
> org.apache.flume.agent.embedded.EmbeddedSource
> 14/08/20 16:37:12 INFO sink.DefaultSinkFactory: Creating instance of sink: 
> agent1, type: avro
> 14/08/20 16:37:12 INFO sink.AbstractRpcSink: Connection reset is set to 0. 
> Will not reset connection to next hop
> 14/08/20 16:37:12 INFO node.AbstractConfigurationProvider: Channel 
> channel-flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0 connected to 
> [source-flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0, agent1]
> 14/08/20 16:37:12 INFO file.FileChannel: Starting FileChannel 
> channel-flumeAppender-fa1d7b7179c6a671efca3ac5c658c6c0 { dataDirs: 
> [flumedata/file-channel/data] }...



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to