Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.
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