Hi Rajani,

Thanks!! your feedback is very helpful for our project.


On Mon, Jul 7, 2014 at 9:59 AM, Rajani Karuturi <rajani.karut...@citrix.com>
wrote:

>  Hi Ashish,
>
>  It does have timestamp, log level, thread name etc.  though we do not
> use the level appropriately at some places.
> Here is a sample log line:
> 2014-07-04 09:00:19,456 WARN  [o.a.c.f.j.AsyncJobExecutionContext]
> (StatsCollector-3:ctx-0090dd87) Job is executed without a context, setup
> psudo job for the executing thread
>
>  We use log4j for logging with a conversion pattern of %d{ISO8601} %-5p
> [%c{1.}] (%t:%x) %m%n
> description about the pattern can be found here
> https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/PatternLayout.html
>
>
>  ~Rajani
>
>
>
>  On 06-Jul-2014, at 11:53 am, Ashish Sureka <ash...@iiitd.ac.in> wrote:
>
> We [Professor and PhD Student in Software Engineering at a State University
> in India] are working towards a source code analysis tool which can assist
> practitioners in writing effecting log statements. There are more than
> 10000 log statements in CloudStack (s_logger.error, s_logger.warn,
> s_logger.trace, s_logger.info……………….)
>
>
> The focus of this email is on format and consistency of log statements. We
> analyzed all the log statements and observe that the log statements prints
> a message and variable(s).  However it does not print the log level,
> timestamp and thread-name. I believe you agree with me that - Information
> like timestamp [Date date= new Date(); new Timestamp(date.getTime())] and
> thread-name [Thread.currentThread().getName()] is useful for diagnosing
> production failure and root-cause analysis. It is also useful in studying
> patterns and trends. We have the following questions:
>
>
> 1)      Why log-level, timestamp and thread-name is not logged.
>
> 2)      How important (different people may have different opinion) is
> Point 1 (mentioning log-level, timestamp and thread-name)
>
> 3)      Is there a standard guideline for developers for writing log
> statements – which CloudStack developers need to follow
>
> 4)      Do you use any log-analysis tool? How are logs analyzed (visual
> inspection, home-grown tool/program, external open-source/commercial tool)?
>
> 5)      CloudStack can be used in a multi-threaded environment and I am not
> clear why the thread name is not printed
>
> Thanks in advance and appreciate it. We want to build a tool (not just
> about format and consistency) that will be practically useful to
> practitioners and will make it open-source & publicly available. This is
> part of an academic/research study and hence request a response to all
> questions.
>
>
> Thanks and Regards,
>
>
> Ashish and Sangeeta
>
> --
> Ashish Sureka : [Homepage http://www.iiitd.edu.in/~ashish/ ] , [Blog :
> http://ashish-sureka-delhi.blogspot.in/ ]
>
>
>


-- 
Regards...
Sangeeta
Assistant Professor
CSE Department @JIIT Noida

Reply via email to