Thank you very much for the prompt reply, unfortunately I tried putting the
link in worker.xml:
<configuration monitorInterval="60">
<include optional="true" resource="log4j2_include.xml"/>
<properties>
…
and it still can’t generate my custom logs.
Otherwise, I noticed that the next statement is in the error logs:
ERROR Policies has no parameter that matches element DefaultRolloverStrategy
But I don’t know if it’s relates. So, Does anyone see something wrong here?
log4j2_include.xml included in the deployed jar:
<included>
<Appenders>
<RollingFile name="ExclamationBolt"
fileName="/home/deploygame/ExclamationBolt.out"
filePattern="/home/deploygame/ExclamationBolt.out.%i.gz">
<PatternLayout>
<pattern>${pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="100 MB" /> <!-- Or every 100 MB -->
<DefaultRolloverStrategy max="4" />
</Policies>
</RollingFile>
</Appenders>
<Loggers>
<Logger name="package.ExclamationBolt"
level="debug" additivity="false">
<appender-ref ref="ExclamationBolt" level="debug" />
</Logger>
</Loggers>
</included>
2015-09-10 14:33 GMT+02:00 Abhishek Agarwal <[email protected]>:
> There is another worker.xml in the same folder. This is picked up in the
> topology, not cluster.xml
>
> On Thu, Sep 10, 2015 at 3:40 PM, Miguel Ángel Fernández Fernández <
> [email protected]> wrote:
>
>> I recently started working in 0.10 storm version, that as it is mentioned
>> in https://storm.apache.org/2015/06/15/storm0100-beta-released.html,
>> “now uses Apache Log4j 2”
>>
>> My problem is that now I don’t know how to include topology log
>> configurations in my cluster.
>>
>> Until now, I usually updates {storm_path}/logback/cluster.xml (<include
>> optional="true" resource="logback_include.xml"/>) and also include
>> the custom project logback_include.xml configuration in the .jar file:
>>
>> <included>
>>
>> <appender name="FILEDebugStream"
>> class="ch.qos.logback.core.FileAppender">
>> <file>/tmp/File.log
>> </file>
>> <append>true</append>
>> <encoder>
>> <pattern>%date %-5level %logger{0} - %msg %n</pattern>
>> </encoder>
>> </appender>
>>
>> <logger name="package.class"
>> level="DEBUG">
>> <appender-ref ref="FILEDebugStream" />
>> </logger>
>> </included>
>>
>> In storm 0.10 I tried to follow a similar structure (with a log4j file),
>> but it don't seem to do the trick. Did anybody have this problem?
>>
>
>
>
> --
> Regards,
> Abhishek Agarwal
>
>