Test Classes log file in aem | Community
Skip to main content
October 16, 2015
Solved

Test Classes log file in aem

  • October 16, 2015
  • 3 replies
  • 1497 views

I trying to show test classes log in log file (Sling server side junit testing)

I create self log file in  Apache Sling Logging Logger Configuration below attached screenshot   but not show logger value  in log file

@RunWith(SlingAnnotationsTestRunner.class)
public class TopNavigationControllerTest {

{
  private static final Logger LOGGER = LoggerFactory.getLogger(TopNavigationControllerTest.class);

  @Before
        public void setUp() {
          LOGGER.error("%%%%%%%%");

          LOGGER.debug("#####");

            collection = new ArrayList();
            System.out.println("@Before - setUp");
      }

@Test
    public void testgetNavDetails() throws Exception
    {    LOGGER.debug("*************");

}

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

See this AEM topic - it will be helpful:

https://docs.adobe.com/docs/en/cq/5-6-1/deploying/configure_logging.html

3 replies

smacdonald2008
smacdonald2008Accepted solution
New Participant
October 16, 2015
October 16, 2015

thanks......

October 16, 2015

Hi Smacdonald,

I refer this link. maven arc type project src/main/java  folder  inside classes logger see in my created log file but src/test/java folder inside test classes logger unable to see in log file