You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by Prabhu Joseph <pr...@gmail.com> on 2022/05/08 11:28:27 UTC

Log File of Flink Unit Test

Hi, I am trying to understand a Flink Unit Test case and so was checking
the logs of it on my local machine. But I could not find the log file.
Could anyone tell me where/how to get the logs for the unit test case?

In Hadoop, under surefire-reports, the log, out and err file of test class
will be present.

mvn  -Dtest="StreamGraphGeneratorTest" -DfailIfNoTests=false  test


Thanks,
Prabhu Joseph

Re: Log File of Flink Unit Test

Posted by Prabhu Joseph <pr...@gmail.com>.
It prints below INFO logs but not the logs that are part of flink classes.


[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.flink.streaming.api.graph.StreamGraphGeneratorTest
1830 [main] INFO
org.apache.flink.streaming.api.graph.StreamGraphGeneratorTest [] -
================================================================================
Test
testResetBatchExchangeModeInStreamingExecution(org.apache.flink.streaming.api.graph.StreamGraphGeneratorTest)
is running.
--------------------------------------------------------------------------------
2288 [main] INFO
org.apache.flink.streaming.api.graph.StreamGraphGeneratorTest [] -
--------------------------------------------------------------------------------
Test
testResetBatchExchangeModeInStreamingExecution(org.apache.flink.streaming.api.graph.StreamGraphGeneratorTest)
successfully run.
================================================================================
2295 [main] INFO
org.apache.flink.streaming.api.graph.StreamGraphGeneratorTest [] -
================================================================================
Test
testAutoMaxParallelism(org.apache.flink.streaming.api.graph.StreamGraphGeneratorTest)
is running.
--------------------------------------------------------------------------------
2320 [main] INFO
org.apache.flink.streaming.api.graph.StreamGraphGeneratorTest [] -


On Sun, May 8, 2022 at 5:06 PM Jingsong Li <ji...@gmail.com> wrote:

> You can try to modify resources/log4j2-test.properties.
>
> `rootLogger.level = OFF` => `rootLogger.level = INFO`
>
> Best,
> Jingsong
>
> On Sun, May 8, 2022 at 7:29 PM Prabhu Joseph <pr...@gmail.com>
> wrote:
> >
> > Hi, I am trying to understand a Flink Unit Test case and so was checking
> > the logs of it on my local machine. But I could not find the log file.
> > Could anyone tell me where/how to get the logs for the unit test case?
> >
> > In Hadoop, under surefire-reports, the log, out and err file of test
> class
> > will be present.
> >
> > mvn  -Dtest="StreamGraphGeneratorTest" -DfailIfNoTests=false  test
> >
> >
> > Thanks,
> > Prabhu Joseph
>

Re: Log File of Flink Unit Test

Posted by Jingsong Li <ji...@gmail.com>.
You can try to modify resources/log4j2-test.properties.

`rootLogger.level = OFF` => `rootLogger.level = INFO`

Best,
Jingsong

On Sun, May 8, 2022 at 7:29 PM Prabhu Joseph <pr...@gmail.com> wrote:
>
> Hi, I am trying to understand a Flink Unit Test case and so was checking
> the logs of it on my local machine. But I could not find the log file.
> Could anyone tell me where/how to get the logs for the unit test case?
>
> In Hadoop, under surefire-reports, the log, out and err file of test class
> will be present.
>
> mvn  -Dtest="StreamGraphGeneratorTest" -DfailIfNoTests=false  test
>
>
> Thanks,
> Prabhu Joseph