Skip to main content
Oct 16, 2015 2:29 AM UTC
Solved

Test Classes log file in aem

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.
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 16, 2015 2:29 AM UTC

3 replies

Oct 16, 2015 2:29 AM UTC

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 

Translate
Oct 16, 2015 2:29 AM UTC

thanks......

Translate
smacdonald2008
smacdonald2008Accepted solution
Level 10
Oct 16, 2015 2:29 AM UTC

See this AEM topic - it will be helpful:

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

Translate