Java slf4j Logger startTestLogging(String name)

Here you can find the source of startTestLogging(String name)

Description

Adds the test name to MDC so that sift appender can use it and log the new log events to a different file

License

Apache License

Parameter

Parameter Description
name name of the new log file

Declaration

public static void startTestLogging(String name) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import org.slf4j.MDC;

public class Main {
    public static final String TEST_NAME = "test-name";

    /**/*from  w w w  .j av a2  s . c o  m*/
     * Adds the test name to MDC so that sift appender can use it and log the new
     * log events to a different file
     * @param name name of the new log file
     */
    public static void startTestLogging(String name) {
        MDC.put(TEST_NAME, name);
    }
}

Related

  1. setOutputFile(String filename)
  2. setRequestId(String requestId)
  3. sleep(int milliseconds)
  4. sleepMs(Logger logger, long timeMs)
  5. stacktrace(Logger log, Throwable t)
  6. stopTestLogging()
  7. stringifyStackTrace(Exception e)
  8. testLogError(String errorMessage, Exception ex)
  9. traceCall(Class objectClass)