com.hivemq.spi.services.LogService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hivemq-spi Show documentation
Show all versions of hivemq-spi Show documentation
The Service Provider Interfaces for developing HiveMQ plugins.
/*
* Copyright 2015 dc-square GmbH
*
* Licensed 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 com.hivemq.spi.services;
import com.hivemq.spi.annotations.NotNull;
/**
* The logservice which allows to change the internal logger
* of HiveMQ at runtime programmatically
*
* @author Dominik Obermaier
* @since 3.0
*/
public interface LogService {
/**
* The loglevels HiveMQ supports
*/
enum LogLevel {
/**
* The TRACE log level for finest HiveMQ logging
*/
TRACE,
/**
* The DEBUG log level for fine HiveMQ logging
*/
DEBUG,
/**
* The INFO log level. INFO logging is the default HiveMQ log behaviour
*/
INFO,
/**
* The WARN log level which only logs warnings
*/
WARN,
/**
* The ERROR log level which only logs severe HiveMQ errors
*/
ERROR
}
/**
* Changes the log level of the internal HiveMQ logger
*
* This does not support null
parameters. If you pass
* null
, this method is lenient and will ignore the parameter
*
* @param logLevel the new loglevel
*/
void setLogLevel(@NotNull LogLevel logLevel);
/**
* Returns the current log level of the internal HiveMQ logger
*
* @return the current log level of the internal HiveMQ logger
*/
LogLevel getLogLevel();
}