Re: Adding new log4j appender to Apex core

2016-11-24 Thread Vlad Rozov
David, Yes, I understand that the functionality will only be available in case of the predefined log file appender. IMO, such assumption is too restrictive and it does not look that the default configuration will cover majority of use cases. Also, JIRA talks about providing offset in the log

Re: Adding new log4j appender to Apex core

2016-11-23 Thread David Yan
Vlad, The feature only works *if the log file name at error does not change later* . In this case, Priyanka proposes a default appender that the user can use that has this behavior while log rotation is still supported. If the user has a custom log appender, the feature can still work if it sati

Re: Adding new log4j appender to Apex core

2016-11-23 Thread Vlad Rozov
Additionally, I think that it is necessary to re-evaluate the requirements. Custom logging is quite common and many enterprises/Devops have own preferences/policy for log rotation and logging format. I saw instances when logging was redirected to stdout. By enforcing specific rotation policy or

Re: Adding new log4j appender to Apex core

2016-11-23 Thread Vlad Rozov
Both approaches look quite "hacky" to me. Thank you, Vlad On 11/23/16 00:01, Mohit Jotwani wrote: +1 - Approach 2 Regards, Mohit On Wed, Nov 23, 2016 at 12:35 PM, AJAY GUPTA wrote: +1 for approach 2. Regards, Ajay On Wed, Nov 23, 2016 at 12:16 PM, David Yan wrote: The goal of this l

Re: Adding new log4j appender to Apex core

2016-11-23 Thread Mohit Jotwani
+1 - Approach 2 Regards, Mohit On Wed, Nov 23, 2016 at 12:35 PM, AJAY GUPTA wrote: > +1 for approach 2. > > > Regards, > Ajay > > On Wed, Nov 23, 2016 at 12:16 PM, David Yan wrote: > > > The goal of this log4j appender is to provide a log offset and the fixed > > name of the container log file

Re: Adding new log4j appender to Apex core

2016-11-22 Thread AJAY GUPTA
+1 for approach 2. Regards, Ajay On Wed, Nov 23, 2016 at 12:16 PM, David Yan wrote: > The goal of this log4j appender is to provide a log offset and the fixed > name of the container log file (instead of apex.log becoming apex.log.1 and > then apex.log.2, etc due to rotation) as part of an err

Re: Adding new log4j appender to Apex core

2016-11-22 Thread David Yan
The goal of this log4j appender is to provide a log offset and the fixed name of the container log file (instead of apex.log becoming apex.log.1 and then apex.log.2, etc due to rotation) as part of an error STRAM event so users can easily locate the log entries around the error. The user can overr

Re: Adding new log4j appender to Apex core

2016-11-22 Thread Priyanka Gugale
Hi, Thomas, Yes log4j is ultimately owned by user, and they should be able to override it. What I am trying to do is provide a default behavior for Apex. In case user isn't using any logger of their own we should use this new appender of Apex rather than using standard log4j appender as per hadoop

Re: Adding new log4j appender to Apex core

2016-11-22 Thread Sanjay Pujare
The only way to “enforce” this new appender is to update the archetypes (apex-app-archetype and apex-conf-archetype under apex-core/ ) to use the new ones as default. But there does not seem to be a way to enforce this for anyone not using the archetypes. I agree with not relying on ~/.dt in a

Re: Adding new log4j appender to Apex core

2016-11-22 Thread Thomas Weise
The log4j configuration is ultimately owned by the user, so how do you want to enforce a custom appender? I don't think that this should rely on anything in ~/.dt either Thomas On Tue, Nov 22, 2016 at 10:00 AM, Priyanka Gugale wrote: > Hi, > > I am working on APEXCORE-563 >

Adding new log4j appender to Apex core

2016-11-22 Thread Priyanka Gugale
Hi, I am working on APEXCORE-563 As per this Jira we should put log file name in container/operator events. The problem is current RollingFileAppender keeps renaming files from 1 to 2 to ... n as files reach maximum allowed file size. Because of