Java slf4j Logger setContext(String value)

Here you can find the source of setContext(String value)

Description

Puts the passed value in the MDC for key #MAIN_CONTEXT .

License

Open Source License

Parameter

Parameter Description
value the main context

Declaration

public static void setContext(String value) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import org.slf4j.MDC;

public class Main {
    public static final String MAIN_CONTEXT = "context";

    /**/*  ww w .  j ava 2  s.c  o  m*/
     * Puts the passed value in the {@link MDC} for key {@link #MAIN_CONTEXT}.
     * @param value the main context
     */
    public static void setContext(String value) {
        MDC.put(MAIN_CONTEXT, " [" + value + "]");
    }
}

Related

  1. restoreContext(Map mdcContextMap)
  2. rosettaShell(ArrayList a)
  3. set(String key, String value)
  4. setbizSeq(String bizSeq)
  5. setClusterShard(String cluster, String shard)
  6. setDefaultLogger()
  7. setLogger(Logger logger)
  8. setOutputFile(String filename)
  9. setRequestId(String requestId)