biz.aQute.osgi.logger.components.config.RollingLogReaderConfiguration Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of biz.aQute.osgi.logger.components.provider Show documentation
Show all versions of biz.aQute.osgi.logger.components.provider Show documentation
biz.aQute.osgi.logger.components.provider
The newest version!
package biz.aQute.osgi.logger.components.config;
import org.osgi.service.log.LogLevel;
import org.osgi.service.metatype.annotations.AttributeDefinition;
import org.osgi.service.metatype.annotations.ObjectClassDefinition;
@ObjectClassDefinition
public @interface RollingLogReaderConfiguration {
String PID = "biz.aQute.osgi.logger.rolling";
@AttributeDefinition
LogLevel level() default LogLevel.INFO;
/**
* Format of log message in the log files. This uses the standard Java
* String.format support. The order of the parameters is as follows.
*
*
* %1$ time date time format
* %2$ sequence long
* %3$ level LogLevel enum
* %4$ bundle id string (can be empty)
* %5$ thread info string with current thread info
* %6$ logger name string, can be empty
* %7$ message string
* %8$ location string, can be empty
* %9$ service reference string, can be empty
* %10$ stack trace string, multiline, can be empty
*
*
* The format can be prefixed with a data format, for this, wrap it in
* parentheses, like "(MM/dd HH:mm:ss)". See the default format Samples:
*
*
* 2019-06-10T19:16:37:0304 DEBUG 12 [main,com.heilaiq.logfiles.appender.RollingLogFilesAdminImpl] some message [sref=[javax.servlet.Servlet]]
* 2019-06-12T23:17:37:0305 INFO 3 [FelixDispatchQueue,Events.Bundle] BundleEvent STARTED [bundle=com.heilaiq.logfiles.appender]
*
*
* A few relevant tricks:
*
* - You can try this out in the jshell
*
- the < does not move the pointer to the next argument, this is used
* in the default formatting of the time
*
- Explicit argument indices may be used to re-order output. E.g. "%4$2s
* %3$2s %2$2s %1$2s", "a", "b", "c", "d") formats like " d c b a".
*
*
* @return format as described
*/
@AttributeDefinition(name = "Format of log messages", description = "Format of log entries to write", required = false)
String format() default "(MM/dd HH:mm:ss)%1$s %3$-6s [%6$s] %7$s%9$s%10$s";
/**
* Log to the following directory.
*
*/
@AttributeDefinition
String to();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy