org.kuali.common.util.log4j.model.Value Maven / Gradle / Ivy
/**
* Copyright 2010-2014 The Kuali Foundation
*
* Licensed under the Educational Community License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.opensource.org/licenses/ecl2.php
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.kuali.common.util.log4j.model;
/**
* @deprecated
*/
@Deprecated
public enum Value {
ALL, TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF, NULL;
// Log4j only supports "null" (lowercase) as a text value inside log4j.xml
// "NULL" (uppercase) is not supported and causes log4j to emit a WARN level logging message as an unknown level.
// The best solution would be to get log4j to recognize "NULL" as a synonym for "null"
// Failing that, another solution would be to get JAXB to translate "NULL" to "null" and vice versa when writing/reading xml.
// What happens at the moment, is we detect "NULL" and set it to null when creating xml from an object.
// This causes JAXB to omit the "value" attribute entirely from the xml.
// When going the other way (ie creating an object from xml) "NULL" is the default value if the "value" attribute is not present.
// Thus we have a method that works in both directions for dealing with "NULL" vs "null"
// Granted, this is a tad bit crazy and supremely brittle...
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy