001/** 002 * Copyright 2010-2014 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.opensource.org/licenses/ecl2.php 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package org.kuali.common.util.log4j.model; 017 018/** 019 * @deprecated 020 */ 021@Deprecated 022public enum Value { 023 024 ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF, NULL; 025 // Log4j only supports "null" (lowercase) as a text value inside log4j.xml 026 // "NULL" (uppercase) is not supported and causes log4j to emit a WARN level logging message as an unknown level. 027 // The best solution would be to get log4j to recognize "NULL" as a synonym for "null" 028 // Failing that, another solution would be to get JAXB to translate "NULL" to "null" and vice versa when writing/reading xml. 029 // What happens at the moment, is we detect "NULL" and set it to null when creating xml from an object. 030 // This causes JAXB to omit the "value" attribute entirely from the xml. 031 // When going the other way (ie creating an object from xml) "NULL" is the default value if the "value" attribute is not present. 032 // Thus we have a method that works in both directions for dealing with "NULL" vs "null" 033 // Granted, this is a tad bit crazy and supremely brittle... 034 035}