Here you can find the source of logEntrance(Logger logger, String methodName, String methodArguments)
Logs for entrance into every public methods with Level#DEBUG .
Parameter | Description |
---|---|
methodName | The name of method entranced into. |
methodArguments | The method arguments |
logger | the logger instance |
public static void logEntrance(Logger logger, String methodName, String methodArguments)
//package com.java2s; //License from project: Open Source License import org.slf4j.Logger; public class Main { /**// w w w . j a v a 2 s .c o m * <p> * The message format pattern used to log the entrance of method. * </p> */ private static final String ENTRANCE_METHOD_PATTERN = "Entering method %s.\n\tMethod arguments: [%s]."; /** * <p> * Logs for entrance into every public methods with {@link Level#DEBUG}. * </p> * * @param methodName The name of method entranced into. * @param methodArguments The method arguments * @param logger the logger instance */ public static void logEntrance(Logger logger, String methodName, String methodArguments) { logger.debug(String.format(ENTRANCE_METHOD_PATTERN, methodName, methodArguments)); } }