001 /**
002 * $Id: LogRuntimeException.java,v 1.3 2011/07/09 21:43:22 oboehm Exp $
003 *
004 * Copyright (c) 2008 by Oliver Boehm
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License");
007 * you may not use this file except in compliance with the License.
008 * You may obtain a copy of the License at
009 *
010 * http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software
013 * distributed under the License is distributed on an "AS IS" BASIS,
014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express orimplied.
015 * See the License for the specific language governing permissions and
016 * limitations under the License.
017 *
018 * (c)reated 09.10.2008 by oliver (ob@oasd.de)
019 */
020 package patterntesting.runtime.annotation;
021
022 import java.lang.annotation.*;
023
024 import patterntesting.runtime.log.SimpleLog;
025
026 /**
027 * You want to see a RuntimeException in the log if it happens? Use this
028 * annotation to mark those classes you want to be logged.
029 *
030 * @author <a href="boehm@javatux.de">oliver</a>
031 * @since 09.10.2008
032 * @version $Revision: 1.3 $
033 */
034 @Retention(RetentionPolicy.RUNTIME)
035 @Target({ElementType.TYPE, ElementType.CONSTRUCTOR, ElementType.METHOD})
036 public @interface LogRuntimeException {
037
038 /**
039 * Normally a RuntimeException will be logged with "WARN" as log level.
040 * If you want to change it you can do here.
041 * @see SimpleLog (for the different log levels)
042 */
043 int value() default SimpleLog.LOG_LEVEL_WARN;
044
045 }