org.apache.geode.internal.logging.InternalLogWriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geode-core Show documentation
Show all versions of geode-core Show documentation
Apache Geode provides a database-like consistency model, reliable transaction processing and a shared-nothing architecture to maintain very low latency performance with high concurrency processing
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache 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.apache.org/licenses/LICENSE-2.0
*
* 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.apache.geode.internal.logging;
import org.apache.geode.LogWriter;
import org.apache.geode.i18n.LogWriterI18n;
import org.apache.geode.i18n.StringId;
/**
* Each logger has a level and it will only print messages whose level is greater than or equal to
* the logger's level. The supported logger level constants, in ascending order, are:
*
* - {@link #ALL_LEVEL}
*
- {@link #FINEST_LEVEL}
*
- {@link #FINER_LEVEL}
*
- {@link #FINE_LEVEL}
*
- {@link #CONFIG_LEVEL}
*
- {@link #INFO_LEVEL}
*
- {@link #WARNING_LEVEL}
*
- {@link #ERROR_LEVEL}
*
- {@link #SEVERE_LEVEL}
*
- {@link #NONE_LEVEL}
*
*/
public interface InternalLogWriter extends LogWriter, LogWriterI18n {
/**
* If the writer's level is ALL_LEVEL
then all messages will be logged.
*/
public final static int ALL_LEVEL = Integer.MIN_VALUE;
/**
* If the writer's level is FINEST_LEVEL
then finest, finer, fine, config, info,
* warning, error, and severe messages will be logged.
*/
public final static int FINEST_LEVEL = 300;
/**
* If the writer's level is FINER_LEVEL
then finer, fine, config, info, warning,
* error, and severe messages will be logged.
*/
public final static int FINER_LEVEL = 400;
/**
* If the writer's level is FINE_LEVEL
then fine, config, info, warning, error, and
* severe messages will be logged.
*/
public final static int FINE_LEVEL = 500;
/**
* If the writer's level is CONFIG_LEVEL
then config, info, warning, error, and
* severe messages will be logged.
*/
public final static int CONFIG_LEVEL = 700;
/**
* If the writer's level is INFO_LEVEL
then info, warning, error, and severe messages
* will be logged.
*/
public final static int INFO_LEVEL = 800;
/**
* If the writer's level is WARNING_LEVEL
then warning, error, and severe messages
* will be logged.
*/
public final static int WARNING_LEVEL = 900;
/**
* If the writer's level is SEVERE_LEVEL
then only severe messages will be logged.
*/
public final static int SEVERE_LEVEL = 1000;
/**
* If the writer's level is ERROR_LEVEL
then error and severe messages will be
* logged.
*/
public final static int ERROR_LEVEL = (WARNING_LEVEL + SEVERE_LEVEL) / 2;
/**
* If the writer's level is NONE_LEVEL
then no messages will be logged.
*/
public final static int NONE_LEVEL = Integer.MAX_VALUE;
public static final String[] levelNames = new String[] {"all", "finest", "finer", "fine",
"config", "info", "warning", "error", "severe", "none"};
public static final int[] allLevels = new int[] {ALL_LEVEL, FINEST_LEVEL, FINER_LEVEL, FINE_LEVEL,
CONFIG_LEVEL, INFO_LEVEL, WARNING_LEVEL, ERROR_LEVEL, SEVERE_LEVEL, NONE_LEVEL};
public int getLogWriterLevel();
public void setLogWriterLevel(int LogWriterLevel);
public boolean isSecure();
public String getConnectionName();
/**
* Logs a message and an exception of the given level.
*
* @param msgLevel the level code for the message to log
* @param msg the actual message to log
* @param exception the actual Exception to log
*/
public void put(int msgLevel, String msg, Throwable exception);
/**
* Logs a message and an exception of the given level.
*
* @param msgLevel the level code for the message to log
* @param msgId A locale agnostic form of the message
* @param params the Object arguments to plug into the message
* @param exception the actual Exception to log
*/
public void put(int msgLevel, StringId msgId, Object[] params, Throwable exception);
}