Logger.java revision 953:221a84ef44c0
11558Srgrimes/* 21558Srgrimes * Copyright (c) 2010, 2014, Oracle and/or its affiliates. All rights reserved. 31558Srgrimes * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 41558Srgrimes * 51558Srgrimes * This code is free software; you can redistribute it and/or modify it 61558Srgrimes * under the terms of the GNU General Public License version 2 only, as 71558Srgrimes * published by the Free Software Foundation. Oracle designates this 81558Srgrimes * particular file as subject to the "Classpath" exception as provided 91558Srgrimes * by Oracle in the LICENSE file that accompanied this code. 101558Srgrimes * 111558Srgrimes * This code is distributed in the hope that it will be useful, but WITHOUT 121558Srgrimes * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 131558Srgrimes * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 141558Srgrimes * version 2 for more details (a copy is included in the LICENSE file that 151558Srgrimes * accompanied this code). 161558Srgrimes * 171558Srgrimes * You should have received a copy of the GNU General Public License version 181558Srgrimes * 2 along with this work; if not, write to the Free Software Foundation, 191558Srgrimes * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 201558Srgrimes * 211558Srgrimes * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 221558Srgrimes * or visit www.oracle.com if you need additional information or have any 231558Srgrimes * questions. 241558Srgrimes */ 251558Srgrimespackage jdk.nashorn.internal.runtime.logging; 261558Srgrimes 271558Srgrimesimport java.lang.annotation.Retention; 281558Srgrimesimport java.lang.annotation.RetentionPolicy; 291558Srgrimes 301558Srgrimes/** 311558Srgrimes * This annotation is associated with a class that has a logger. 321558Srgrimes * It contains a name property of the logger name. e.g. a class 331558Srgrimes * whose logger can be initialized by --log:fields, should be 341558Srgrimes * annotated @Logger(name="fields"). Multiple classes can have 3513171Swollman * the same annotation, which will make them use the same logger 361558Srgrimes * object. Usually a class with this annotation is also a Loggable, 371558Srgrimes * but it is not a hard demand 381558Srgrimes * 391558Srgrimes * @see Loggable 401558Srgrimes */ 4137907Scharnier@Retention(RetentionPolicy.RUNTIME) 421558Srgrimespublic @interface Logger { 4337907Scharnier /** 4413171Swollman * Get the name of the logger 4550476Speter * @return logger name 461558Srgrimes */ 471558Srgrimes public String name() default ""; 481558Srgrimes} 491558Srgrimes