JSP

 

DEBUG < INFO < WARN < ERROR

 

https://logback.qos.ch/manual/configuration.html

 

<configuration>

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <root level="debug">
    <appender-ref ref="STDOUT" />
  </root>
</configuration>

 

<configuration>

  <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
    <!-- encoders are assigned the type
         ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
    <encoder>
      <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
    </encoder>
  </appender>

  <logger name="chapters.configuration" level="INFO"/>

  <!-- Strictly speaking, the level attribute is not necessary since -->
  <!-- the level of the root level is set to DEBUG by default.       -->
  <root level="DEBUG">          
    <appender-ref ref="STDOUT" />
  </root>  
  
</configuration>

 

 logger.debug(" CreateUserServlet Login 정보 {} , {}  : ", user.toString(), "user 정보"); 

 


검색어  : logging eclipse template

 

=>검색 주소 :  https://stackoverflow.com/questions/1028858/useful-eclipse-java-code-templates

  

down voteaccepted

+50

The following code templates will both create a logger and create the right imports, if needed.

SLF4J

${:import(org.slf4j.Logger,org.slf4j.LoggerFactory)}
private static final Logger LOG = LoggerFactory.getLogger(${enclosing_type}.class);

Log4J 2

${:import(org.apache.logging.log4j.LogManager,org.apache.logging.log4j.Logger)} 
private static final Logger LOG = LogManager.getLogger(${enclosing_type}.class); 

Log4J

${:import(org.apache.log4j.Logger)}
private static final Logger LOG = Logger.getLogger(${enclosing_type}.class);

Source.

JUL

${:import(java.util.logging.Logger)}
private static final Logger LOG = Logger.getLogger(${enclosing_type}.class.getName())

 

 

 


이클립스 환경설정


template 입력

java -> template
 

 

이클립스 코드 템플릿(Code Templates) 설정

출처: http://linuxism.tistory.com/486 [linuxism]

 

https://www.tutorialspoint.com/eclipse/eclipse_code_templates.htm

 

 

 

 

 

 

 

 

 

jsp

 

about author

PHRASE

Level 60  머나먼나라

만일 우리 모두가 늙은이나 젊은이나 남자나 여자나 모두 진실로 돌아가서, 일할 때나, 식사할 때나, 마실 때나, 놀 때나, 눈을 떴을 때나, 언제든지 그리고 마침내 육체가 진실과 혼연 일체가 된다면 얼마나 아름다울 것인가. -간디

댓글 ( 4)

댓글 남기기

작성