Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Test Classes log file in aem

Avatar

Former Community Member

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("*************");

}

1 Accepted Solution

Avatar

Correct answer by
Level 10
3 Replies

Avatar

Correct answer by
Level 10

Avatar

Former Community Member

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