Logging - Interview Questions and Answers for 'Abs' | Search Interview Question - javasearch.buggybread.com
Javasearch.buggybread.com

Search Interview Questions


 More than 3000 questions in repository.
 There are more than 900 unanswered questions.
Click here and help us by providing the answer.
 Have a video suggestion.
Click Correct / Improve and please let us know.
Label / Company      Label / Company / Text

   



Logging - Interview Questions and Answers for 'Abs' - 1 question(s) found - Order By Newest

 Q1. Difference between log4j and slf4j ?Logging
 This question was recently asked at 'Y Media Labs'.This question is still unanswered. Can you please provide an answer.


 Help us improve. Please let us know the company, where you were asked this question :   

   Like         Discuss         Correct / Improve     log4j vs slf4j     Asked in 1 Companies


Related Questions

  What are some different logging levels for log4j ?
 How will you design a Log4j kind of framework.
 What is the difference between log4j and java logging api.
 What is the difference between TimeBasedRollingPolicy and SizeBasedTriggeringPolicy within Log4j ? Can we use both together and What would that mean ?
 What is the difference between RollingFile and RollingRandomAccessFile in log4j ?
 In following log4j configuration file, How should we change the logging level to WARN

<Configuration status="DEBUG">
<Appenders>
<RollingFile name="File" fileName="logs/xyz.log" filePattern="logs/xyz-%d{MM-dd-yyyy}.log.gz">
      <TimeBasedTriggeringPolicy />
   </RollingFile>
</Appenders>
<Loggers>
<Root level="DEBUG">
<AppenderRef ref="File" />
</Root>
</Loggers>
</Configuration>
 in the following log4j config file, How should we change the file name and format


<Configuration status="DEBUG">
<Appenders>
<RollingFile name="File" fileName="logs/xyz.log" filePattern="logs/xyz-%d{MM-dd-yyyy}.log.gz">
      <TimeBasedTriggeringPolicy />
   </RollingFile>
</Appenders>
<Loggers>
<Root level="DEBUG">
<AppenderRef ref="File" />
</Root>
</Loggers>
</Configuration>
 In the following log4j config, What if we don't need rolling logs

<Configuration status="DEBUG">
<Appenders>
<RollingFile name="File" fileName="logs/xyz.log" filePattern="logs/xyz-%d{MM-dd-yyyy}.log.gz">
      <TimeBasedTriggeringPolicy />
   </RollingFile>
</Appenders>
<Loggers>
<Root level="DEBUG">
<AppenderRef ref="File" />
</Root>
</Loggers>
</Configuration>
 What are some of the Log4j appenders ?
 Can you organize following Log4j levels in hierarchy ?

WARN, DEBUG,INFO, ERROR


 Q2. Which method needs to be implemented if a class is implementing comparable interface ?Core Java
a. comp
b. compare
c. compareTo
d. compareEquals

Ans.c. compareTo

 Q3. What is Dirty Read in Database Transactions ?Database
a. Data Read by Transaction 2 which hasn't yet updated by Transaction 1
b. Data Read by Transaction 2 which has been updated and commited by Transaction 1
c. Data Read by Transaction 2 which has been updated but not commited by Transaction 1
d. Inability of Transaction 2 to read Data when Transaction 1 is updating.

Ans.c. Data Read by Transaction 2 which has been updated but not commited by Transaction 1

 Q4. Which of the following is not true for abstract classes ?Core Java
a. Abstract Class is only meant to be sub classed and not supposed to be instantiated.
b. Abstract class handlers can be used to handle derived class objects.
c. We can't have an abstract class without abstract methods.
d. Abstract class has member elements.

Ans.c. We can't have an abstract class without abstract methods.

 Q5. Which of the following class creates immutable objects ?Core Java
a. String
b. StringBuffer
c. StringBuilder
d. None of these create immutable objects.

Ans.a. String

 Q6. Which of the following can be declared abstract ?Core Java
a. static methods
b. instance methods
c. static variable
d. instance variables

Ans.b. instance methods

 Q7. In majority of the cases, the following join will give maximum number of results ?Database
a. Inner Join
b. Outer Join
c. Left Join
d. Right Join

Ans.b. Outer Join

 Q8. Which if the following is true for SQL Joins ?Database
a. Left Join and Right Join gives equal number of Results
b. Outer Join and Inner Join gives equal number of Results
c. Inner Join gives maximum number of results records
d. Inner Join gives minimum number of result records

Ans.d. Inner Join gives minimum number of result records

 Q9. Which of the following is not true for Prepared Statements ?Database
a. Prepared Statements provides better performance
b. Prepared Statements prevent SQL Injection attacks
c. Prepared Statements provide ORM capabilities
d. Prepared Statement provides DB side caching

Ans.c. Prepared Statements provide ORM capabilities


Help us and Others Improve. Please let us know the questions asked in any of your previous interview.

Any input from you will be highly appreciated and It will unlock the application for 10 more requests.

Company Name:
Questions Asked: