Source code

    001/**
    002 * Copyright (c) 2004-2011 QOS.ch
    003 * All rights reserved.
    004 *
    005 * Permission is hereby granted, free  of charge, to any person obtaining
    006 * a  copy  of this  software  and  associated  documentation files  (the
    007 * "Software"), to  deal in  the Software without  restriction, including
    008 * without limitation  the rights to  use, copy, modify,  merge, publish,
    009 * distribute,  sublicense, and/or sell  copies of  the Software,  and to
    010 * permit persons to whom the Software  is furnished to do so, subject to
    011 * the following conditions:
    012 *
    013 * The  above  copyright  notice  and  this permission  notice  shall  be
    014 * included in all copies or substantial portions of the Software.
    015 *
    016 * THE  SOFTWARE IS  PROVIDED  "AS  IS", WITHOUT  WARRANTY  OF ANY  KIND,
    017 * EXPRESS OR  IMPLIED, INCLUDING  BUT NOT LIMITED  TO THE  WARRANTIES OF
    018 * MERCHANTABILITY,    FITNESS    FOR    A   PARTICULAR    PURPOSE    AND
    019 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
    020 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
    021 * OF CONTRACT, TORT OR OTHERWISE,  ARISING FROM, OUT OF OR IN CONNECTION
    022 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    023 *
    024 */
    025package org.slf4j.agent;
    026
    027/**
    028 * <p>
    029 * All recognized options in the string passed to the java agent. For
    030 * "java -javaagent:foo.jar=OPTIONS HelloWorld" this would be "OPTIONS".
    031 * </p>
    032 * <p>
    033 * It is considered to be a list of options separated by (currently) ";", on the
    034 * form "option=value". The interpretation of "value" is specific to each
    035 * option.
    036 * </p>
    037 */
    038public class AgentOptions {
    039
    040    /**
    041     * List of class prefixes to ignore when instrumenting. Note: Classes loaded
    042     * before the agent cannot be instrumented.
    043     */
    044    public static final String IGNORE = "ignore";
    045    /**
    046     * Indicate the SLF4J level that should be used by the logging statements
    047     * added by the agent. Default is "info".
    048     */
    049    public static final String LEVEL = "level";
    050    /**
    051     * Indicate that the agent should print out "new java.util.Date()" at the time
    052     * the option was processed and at shutdown time (using the shutdown hook).
    053     *
    054     */
    055    public static final String TIME = "time";
    056    /**
    057     * Indicate that the agent should log actions to System.err, like adding
    058     * logging to methods, etc.
    059     *
    060     */
    061    public static final String VERBOSE = "verbose";
    062
    063}