Merge pull request #7054 from atorralba/atorralba/promote-log-injection

Java: Promote Log Injection from experimental
This commit is contained in:
Tony Torralba
2022-01-11 17:26:18 +01:00
committed by GitHub
43 changed files with 5394 additions and 89 deletions

View File

@@ -0,0 +1,168 @@
package generatedtest;
import java.util.logging.LogRecord;
import org.apache.logging.log4j.Logger;
import org.apache.logging.log4j.message.EntryMessage;
import org.apache.logging.log4j.message.Message;
import org.slf4j.spi.LoggingEventBuilder;
// Test case generated by GenerateFlowTestCase.ql
public class Test {
Object source() {
return null;
}
void sink(Object o) {}
public void test() throws Exception {
{
// "java.util.logging;LogRecord;false;LogRecord;;;Argument[1];Argument[-1];taint"
LogRecord out = null;
String in = (String) source();
out = new LogRecord(null, in);
sink(out); // $ hasTaintFlow
}
{
// "org.apache.logging.log4j;Logger;true;traceEntry;(Message);;Argument[0];ReturnValue;taint"
EntryMessage out = null;
Message in = (Message) source();
Logger instance = null;
out = instance.traceEntry(in);
sink(out); // $ hasTaintFlow
}
{
// "org.apache.logging.log4j;Logger;true;traceEntry;(String,Object[]);;Argument[0..1];ReturnValue;taint"
EntryMessage out = null;
Object[] in = (Object[]) source();
Logger instance = null;
out = instance.traceEntry((String) null, in);
sink(out); // $ hasTaintFlow
}
{
// "org.apache.logging.log4j;Logger;true;traceEntry;(String,Object[]);;Argument[0..1];ReturnValue;taint"
EntryMessage out = null;
String in = (String) source();
Logger instance = null;
out = instance.traceEntry(in, (Object[]) null);
sink(out); // $ hasTaintFlow
}
{
// "org.apache.logging.log4j;Logger;true;traceEntry;(String,Supplier[]);;Argument[0..1];ReturnValue;taint"
EntryMessage out = null;
String in = (String) source();
Logger instance = null;
out = instance.traceEntry(in, (org.apache.logging.log4j.util.Supplier[]) null);
sink(out); // $ hasTaintFlow
}
{
// "org.apache.logging.log4j;Logger;true;traceEntry;(String,Supplier[]);;Argument[0..1];ReturnValue;taint"
EntryMessage out = null;
org.apache.logging.log4j.util.Supplier[] in =
(org.apache.logging.log4j.util.Supplier[]) source();
Logger instance = null;
out = instance.traceEntry((String) null, in);
sink(out); // $ hasTaintFlow
}
{
// "org.apache.logging.log4j;Logger;true;traceEntry;(Supplier[]);;Argument[0];ReturnValue;taint"
EntryMessage out = null;
org.apache.logging.log4j.util.Supplier[] in =
(org.apache.logging.log4j.util.Supplier[]) source();
Logger instance = null;
out = instance.traceEntry(in);
sink(out); // $ hasTaintFlow
}
{
// "org.apache.logging.log4j;Logger;true;traceExit;(EntryMessage,Object);;Argument[1];ReturnValue;value"
Object out = null;
Object in = (Object) source();
Logger instance = null;
out = instance.traceExit((EntryMessage) null, in);
sink(out); // $ hasValueFlow
}
{
// "org.apache.logging.log4j;Logger;true;traceExit;(Message,Object);;Argument[1];ReturnValue;value"
Object out = null;
Object in = (Object) source();
Logger instance = null;
out = instance.traceExit((Message) null, in);
sink(out); // $ hasValueFlow
}
{
// "org.apache.logging.log4j;Logger;true;traceExit;(Object);;Argument[0];ReturnValue;value"
Object out = null;
Object in = (Object) source();
Logger instance = null;
out = instance.traceExit(in);
sink(out); // $ hasValueFlow
}
{
// "org.apache.logging.log4j;Logger;true;traceExit;(String,Object);;Argument[1];ReturnValue;value"
Object out = null;
Object in = (Object) source();
Logger instance = null;
out = instance.traceExit((String) null, in);
sink(out); // $ hasValueFlow
}
{
// "org.slf4j.spi;LoggingEventBuilder;true;addArgument;;;Argument[-1];ReturnValue;value"
LoggingEventBuilder out = null;
LoggingEventBuilder in = (LoggingEventBuilder) source();
out = in.addArgument((Object) null);
sink(out); // $ hasValueFlow
}
{
// "org.slf4j.spi;LoggingEventBuilder;true;addArgument;;;Argument[-1];ReturnValue;value"
LoggingEventBuilder out = null;
LoggingEventBuilder in = (LoggingEventBuilder) source();
out = in.addArgument((java.util.function.Supplier) null);
sink(out); // $ hasValueFlow
}
{
// "org.slf4j.spi;LoggingEventBuilder;true;addKeyValue;;;Argument[-1];ReturnValue;value"
LoggingEventBuilder out = null;
LoggingEventBuilder in = (LoggingEventBuilder) source();
out = in.addKeyValue((String) null, (Object) null);
sink(out); // $ hasValueFlow
}
{
// "org.slf4j.spi;LoggingEventBuilder;true;addKeyValue;;;Argument[-1];ReturnValue;value"
LoggingEventBuilder out = null;
LoggingEventBuilder in = (LoggingEventBuilder) source();
out = in.addKeyValue((String) null, (java.util.function.Supplier) null);
sink(out); // $ hasValueFlow
}
{
// "org.slf4j.spi;LoggingEventBuilder;true;addKeyValue;;;Argument[1];Argument[-1];taint"
LoggingEventBuilder out = null;
Object in = (Object) source();
out.addKeyValue((String) null, in);
sink(out); // $ hasTaintFlow
}
{
// "org.slf4j.spi;LoggingEventBuilder;true;addKeyValue;;;Argument[1];Argument[-1];taint"
LoggingEventBuilder out = null;
java.util.function.Supplier in = (java.util.function.Supplier) source();
out.addKeyValue((String) null, in);
sink(out); // $ hasTaintFlow
}
{
// "org.slf4j.spi;LoggingEventBuilder;true;addMarker;;;Argument[-1];ReturnValue;value"
LoggingEventBuilder out = null;
LoggingEventBuilder in = (LoggingEventBuilder) source();
out = in.addMarker(null);
sink(out); // $ hasValueFlow
}
{
// "org.slf4j.spi;LoggingEventBuilder;true;setCause;;;Argument[-1];ReturnValue;value"
LoggingEventBuilder out = null;
LoggingEventBuilder in = (LoggingEventBuilder) source();
out = in.setCause(null);
sink(out); // $ hasValueFlow
}
}
}

View File

@@ -0,0 +1 @@
//semmle-extractor-options: --javac-args -cp ${testdir}/../../stubs/apache-log4j-2.14.1:${testdir}/../../stubs/slf4j-2.0.0

View File

@@ -0,0 +1,2 @@
import java
import TestUtilities.InlineFlowTest

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
import java
import semmle.code.java.security.LogInjectionQuery
import TestUtilities.InlineFlowTest
private class TestSource extends RemoteFlowSource {
TestSource() { this.asExpr().(MethodAccess).getMethod().hasName("source") }
override string getSourceType() { result = "test source" }
}
private class LogInjectionTest extends InlineFlowTest {
override DataFlow::Configuration getValueFlowConfig() { none() }
override TaintTracking::Configuration getTaintFlowConfig() {
result instanceof LogInjectionConfiguration
}
}

View File

@@ -0,0 +1 @@
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/apache-log4j-1.2.17:${testdir}/../../../stubs/apache-log4j-2.14.1:${testdir}/../../../stubs/apache-commons-logging-1.2:${testdir}/../../../stubs/jboss-logging-3.4.2:${testdir}/../../../stubs/slf4j-2.0.0:${testdir}/../../../stubs/scijava-common-2.87.1:${testdir}/../../../stubs/flogger-0.7.1:${testdir}/../../../stubs/google-android-9.0.0

View File

@@ -1,5 +1,57 @@
/*
* 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.commons.logging;
public interface Log {
void debug(Object message);
void debug(Object message, Throwable t);
void error(Object message);
void error(Object message, Throwable t);
void fatal(Object message);
void fatal(Object message, Throwable t);
void info(Object message);
void info(Object message, Throwable t);
boolean isDebugEnabled();
boolean isErrorEnabled();
boolean isFatalEnabled();
boolean isInfoEnabled();
boolean isTraceEnabled();
boolean isWarnEnabled();
void trace(Object message);
void trace(Object message, Throwable t);
void warn(Object message);
void warn(Object message, Throwable t);
}

View File

@@ -0,0 +1,47 @@
/*
* 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.log4j;
import org.apache.log4j.spi.Filter;
import org.apache.log4j.spi.ErrorHandler;
import org.apache.log4j.spi.LoggingEvent;
public interface Appender {
void addFilter(Filter newFilter);
Filter getFilter();
void clearFilters();
void close();
void doAppend(LoggingEvent event);
String getName();
void setErrorHandler(ErrorHandler errorHandler);
ErrorHandler getErrorHandler();
void setLayout(Layout layout);
Layout getLayout();
void setName(String name);
boolean requiresLayout();
}

View File

@@ -0,0 +1,181 @@
/*
* 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.
*/
// Contibutors: Alex Blewitt <Alex.Blewitt@ioshq.com>
// Markus Oestreicher <oes@zurich.ibm.com>
// Frank Hoering <fhr@zurich.ibm.com>
// Nelson Minar <nelson@media.mit.edu>
// Jim Cakalic <jim_cakalic@na.biomerieux.com>
// Avy Sharell <asharell@club-internet.fr>
// Ciaran Treanor <ciaran@xelector.com>
// Jeff Turner <jeff@socialchange.net.au>
// Michael Horwitz <MHorwitz@siemens.co.za>
// Calvin Chan <calvin.chan@hic.gov.au>
// Aaron Greenhouse <aarong@cs.cmu.edu>
// Beat Meier <bmeier@infovia.com.ar>
// Colin Sampaleanu <colinml1@exis.com>
package org.apache.log4j;
import org.apache.log4j.spi.AppenderAttachable;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.spi.LoggerRepository;
import java.util.Enumeration;
import java.util.ResourceBundle;
public class Category implements AppenderAttachable {
synchronized public void addAppender(Appender newAppender) {}
public void assertLog(boolean assertion, String msg) {}
public void callAppenders(LoggingEvent event) {}
public void debug(Object message) {}
public void debug(Object message, Throwable t) {}
public void error(Object message) {}
public void error(Object message, Throwable t) {}
public static Logger exists(String name) {
return null;
}
public void fatal(Object message) {}
public void fatal(Object message, Throwable t) {}
public boolean getAdditivity() {
return false;
}
synchronized public Enumeration getAllAppenders() {
return null;
}
synchronized public Appender getAppender(String name) {
return null;
}
public Level getEffectiveLevel() {
return null;
}
public Priority getChainedPriority() {
return null;
}
public static Enumeration getCurrentCategories() {
return null;
}
public static LoggerRepository getDefaultHierarchy() {
return null;
}
public LoggerRepository getHierarchy() {
return null;
}
public LoggerRepository getLoggerRepository() {
return null;
}
public static Category getInstance(String name) {
return null;
}
public static Category getInstance(Class clazz) {
return null;
}
public final String getName() {
return null;
}
final public Category getParent() {
return null;
}
final public Level getLevel() {
return null;
}
final public Level getPriority() {
return null;
}
final public static Category getRoot() {
return null;
}
public ResourceBundle getResourceBundle() {
return null;
}
public void info(Object message) {}
public void info(Object message, Throwable t) {}
public boolean isAttached(Appender appender) {
return false;
}
public boolean isDebugEnabled() {
return false;
}
public boolean isEnabledFor(Priority level) {
return false;
}
public boolean isInfoEnabled() {
return false;
}
public void l7dlog(Priority priority, String key, Throwable t) {}
public void l7dlog(Priority priority, String key, Object[] params, Throwable t) {}
public void log(Priority priority, Object message, Throwable t) {}
public void log(Priority priority, Object message) {}
public void log(String callerFQCN, Priority level, Object message, Throwable t) {}
synchronized public void removeAllAppenders() {}
synchronized public void removeAppender(Appender appender) {}
synchronized public void removeAppender(String name) {}
public void setAdditivity(boolean additive) {}
public void setLevel(Level level) {}
public void setPriority(Priority priority) {}
public void setResourceBundle(ResourceBundle bundle) {}
public static void shutdown() {}
public void warn(Object message) {}
public void warn(Object message, Throwable t) {}
public void forcedLog(String fqcn, Priority level, Object message, Throwable t) {}
}

View File

@@ -0,0 +1,25 @@
/*
* 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.log4j;
import org.apache.log4j.spi.OptionHandler;
public abstract class Layout implements OptionHandler {
public final static String LINE_SEP = System.getProperty("line.separator");
public final static int LINE_SEP_LEN = LINE_SEP.length();
}

View File

@@ -0,0 +1,26 @@
/*
* 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.
*/
// Contributors: Kitching Simon <Simon.Kitching@orange.ch>
// Nicholas Wolff
package org.apache.log4j;
import java.io.Serializable;
public class Level extends Priority implements Serializable {
}

View File

@@ -0,0 +1,31 @@
/*
* 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.log4j;
public class Logger extends Category {
public void trace(Object message) {
}
public void trace(Object message, Throwable t) {
}
public boolean isTraceEnabled() {
return false;
}
}

View File

@@ -0,0 +1,22 @@
/*
* 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.
*/
// Contributors: Kitching Simon <Simon.Kitching@orange.ch>
package org.apache.log4j;
public class Priority {
}

View File

@@ -0,0 +1,36 @@
/*
* 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.log4j.spi;
import org.apache.log4j.Appender;
import java.util.Enumeration;
public interface AppenderAttachable {
void addAppender(Appender newAppender);
Enumeration getAllAppenders();
Appender getAppender(String name);
boolean isAttached(Appender appender);
void removeAllAppenders();
void removeAppender(Appender appender);
void removeAppender(String name);
}

View File

@@ -0,0 +1,34 @@
/*
* 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.log4j.spi;
import org.apache.log4j.Appender;
import org.apache.log4j.Logger;
public interface ErrorHandler extends OptionHandler {
void setLogger(Logger logger);
void error(String message, Exception e, int errorCode);
void error(String message);
void error(String message, Exception e, int errorCode, LoggingEvent event);
void setAppender(Appender appender);
void setBackupAppender(Appender appender);
}

View File

@@ -0,0 +1,25 @@
/*
* 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.log4j.spi;
public abstract class Filter implements OptionHandler {
public void setNext(Filter next) {}
public Filter getNext() {
return null;
}
}

View File

@@ -0,0 +1,52 @@
/*
* 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.log4j.spi;
import java.util.Enumeration;
import org.apache.log4j.Appender;
import org.apache.log4j.Category;
import org.apache.log4j.Level;
import org.apache.log4j.Logger;
public interface LoggerRepository {
boolean isDisabled(int level);
void setThreshold(Level level);
void setThreshold(String val);
void emitNoAppenderWarning(Category cat);
Level getThreshold();
Logger getLogger(String name);
Logger getRootLogger();
Logger exists(String name);
void shutdown();
Enumeration getCurrentLoggers();
Enumeration getCurrentCategories();
void fireAddAppenderEvent(Category logger, Appender appender);
void resetConfiguration();
}

View File

@@ -0,0 +1,77 @@
/*
* 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.log4j.spi;
import java.util.Map;
import java.util.Set;
import org.apache.log4j.Category;
import org.apache.log4j.Level;
import org.apache.log4j.Priority;
public class LoggingEvent implements java.io.Serializable {
public LoggingEvent(String fqnOfCategoryClass, Category logger, Priority level, Object message,
Throwable throwable) {}
public LoggingEvent(String fqnOfCategoryClass, Category logger, long timeStamp, Priority level,
Object message, Throwable throwable) {}
public Level getLevel() {
return null;
}
public String getLoggerName() {
return null;
}
public Category getLogger() {
return null;
}
public static long getStartTime() {
return 0;
}
public final void setProperty(final String propName, final String propValue) {}
public final String getProperty(final String key) {
return null;
}
public final boolean locationInformationExists() {
return false;
}
public final long getTimeStamp() {
return 0;
}
public Set getPropertyKeySet() {
return null;
}
public Map getProperties() {
return null;
}
public String getFQNOfLoggerClass() {
return null;
}
public Object removeProperty(String propName) {
return null;
}
}

View File

@@ -0,0 +1,23 @@
/*
* 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.log4j.spi;
public interface OptionHandler {
void activateOptions();
}

View File

@@ -0,0 +1,573 @@
/*
* Copyright (C) 2012 The Flogger Authors.
*
* 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.google.common.flogger;
import java.util.concurrent.TimeUnit;
// NOTE: new methods to this interface should be coordinated with google-java-format
public interface LoggingApi<API extends LoggingApi<API>> {
API withCause(Throwable cause);
API every(int n);
API atMostEvery(int n, TimeUnit unit);
API per(Enum<?> key);
API withInjectedLogSite(String internalClassName, String methodName, int encodedLineNumber,
String sourceFileName);
boolean isEnabled();
void logVarargs(String message, Object[] varargs);
void log();
void log(String msg);
void log(String msg, Object p1);
void log(String msg, Object p1, Object p2);
void log(String msg, Object p1, Object p2, Object p3);
void log(String msg, Object p1, Object p2, Object p3, Object p4);
void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5);
void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6);
void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7);
void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7,
Object p8);
void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7,
Object p8, Object p9);
void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7,
Object p8, Object p9, Object p10);
void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5, Object p6, Object p7,
Object p8, Object p9, Object p10, Object... rest);
void log(String msg, char p1);
void log(String msg, byte p1);
void log(String msg, short p1);
void log(String msg, int p1);
void log(String msg, long p1);
void log(String msg, Object p1, boolean p2);
void log(String msg, Object p1, char p2);
void log(String msg, Object p1, byte p2);
void log(String msg, Object p1, short p2);
void log(String msg, Object p1, int p2);
void log(String msg, Object p1, long p2);
void log(String msg, Object p1, float p2);
void log(String msg, Object p1, double p2);
void log(String msg, boolean p1, Object p2);
void log(String msg, char p1, Object p2);
void log(String msg, byte p1, Object p2);
void log(String msg, short p1, Object p2);
void log(String msg, int p1, Object p2);
void log(String msg, long p1, Object p2);
void log(String msg, float p1, Object p2);
void log(String msg, double p1, Object p2);
void log(String msg, boolean p1, boolean p2);
void log(String msg, char p1, boolean p2);
void log(String msg, byte p1, boolean p2);
void log(String msg, short p1, boolean p2);
void log(String msg, int p1, boolean p2);
void log(String msg, long p1, boolean p2);
void log(String msg, float p1, boolean p2);
void log(String msg, double p1, boolean p2);
void log(String msg, boolean p1, char p2);
void log(String msg, char p1, char p2);
void log(String msg, byte p1, char p2);
void log(String msg, short p1, char p2);
void log(String msg, int p1, char p2);
void log(String msg, long p1, char p2);
void log(String msg, float p1, char p2);
void log(String msg, double p1, char p2);
void log(String msg, boolean p1, byte p2);
void log(String msg, char p1, byte p2);
void log(String msg, byte p1, byte p2);
void log(String msg, short p1, byte p2);
void log(String msg, int p1, byte p2);
void log(String msg, long p1, byte p2);
void log(String msg, float p1, byte p2);
void log(String msg, double p1, byte p2);
void log(String msg, boolean p1, short p2);
void log(String msg, char p1, short p2);
void log(String msg, byte p1, short p2);
void log(String msg, short p1, short p2);
void log(String msg, int p1, short p2);
void log(String msg, long p1, short p2);
void log(String msg, float p1, short p2);
void log(String msg, double p1, short p2);
void log(String msg, boolean p1, int p2);
void log(String msg, char p1, int p2);
void log(String msg, byte p1, int p2);
void log(String msg, short p1, int p2);
void log(String msg, int p1, int p2);
void log(String msg, long p1, int p2);
void log(String msg, float p1, int p2);
void log(String msg, double p1, int p2);
void log(String msg, boolean p1, long p2);
void log(String msg, char p1, long p2);
void log(String msg, byte p1, long p2);
void log(String msg, short p1, long p2);
void log(String msg, int p1, long p2);
void log(String msg, long p1, long p2);
void log(String msg, float p1, long p2);
void log(String msg, double p1, long p2);
void log(String msg, boolean p1, float p2);
void log(String msg, char p1, float p2);
void log(String msg, byte p1, float p2);
void log(String msg, short p1, float p2);
void log(String msg, int p1, float p2);
void log(String msg, long p1, float p2);
void log(String msg, float p1, float p2);
void log(String msg, double p1, float p2);
void log(String msg, boolean p1, double p2);
void log(String msg, char p1, double p2);
void log(String msg, byte p1, double p2);
void log(String msg, short p1, double p2);
void log(String msg, int p1, double p2);
void log(String msg, long p1, double p2);
void log(String msg, float p1, double p2);
void log(String msg, double p1, double p2);
public static class NoOp<API extends LoggingApi<API>> implements LoggingApi<API> {
@Override
public API withInjectedLogSite(String internalClassName, String methodName,
int encodedLineNumber, String sourceFileName) {
return null;
}
@Override
public final boolean isEnabled() {
return false;
}
@Override
public API per(Enum<?> key) {
return null;
}
@Override
public final API withCause(Throwable cause) {
return null;
}
@Override
public final API every(int n) {
return null;
}
@Override
public final API atMostEvery(int n, TimeUnit unit) {
return null;
}
@Override
public final void logVarargs(String msg, Object[] params) {}
@Override
public final void log() {}
@Override
public final void log(String msg) {}
@Override
public final void log(String msg, Object p1) {}
@Override
public final void log(String msg, Object p1, Object p2) {}
@Override
public final void log(String msg, Object p1, Object p2, Object p3) {}
@Override
public final void log(String msg, Object p1, Object p2, Object p3, Object p4) {}
@Override
public final void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5) {}
@Override
public final void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5,
Object p6) {}
@Override
public final void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5,
Object p6, Object p7) {}
@Override
public final void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5,
Object p6, Object p7, Object p8) {}
@Override
public final void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5,
Object p6, Object p7, Object p8, Object p9) {}
@Override
public final void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5,
Object p6, Object p7, Object p8, Object p9, Object p10) {}
@Override
public final void log(String msg, Object p1, Object p2, Object p3, Object p4, Object p5,
Object p6, Object p7, Object p8, Object p9, Object p10, Object... rest) {}
@Override
public final void log(String msg, char p1) {}
@Override
public final void log(String msg, byte p1) {}
@Override
public final void log(String msg, short p1) {}
@Override
public final void log(String msg, int p1) {}
@Override
public final void log(String msg, long p1) {}
@Override
public final void log(String msg, Object p1, boolean p2) {}
@Override
public final void log(String msg, Object p1, char p2) {}
@Override
public final void log(String msg, Object p1, byte p2) {}
@Override
public final void log(String msg, Object p1, short p2) {}
@Override
public final void log(String msg, Object p1, int p2) {}
@Override
public final void log(String msg, Object p1, long p2) {}
@Override
public final void log(String msg, Object p1, float p2) {}
@Override
public final void log(String msg, Object p1, double p2) {}
@Override
public final void log(String msg, boolean p1, Object p2) {}
@Override
public final void log(String msg, char p1, Object p2) {}
@Override
public final void log(String msg, byte p1, Object p2) {}
@Override
public final void log(String msg, short p1, Object p2) {}
@Override
public final void log(String msg, int p1, Object p2) {}
@Override
public final void log(String msg, long p1, Object p2) {}
@Override
public final void log(String msg, float p1, Object p2) {}
@Override
public final void log(String msg, double p1, Object p2) {}
@Override
public final void log(String msg, boolean p1, boolean p2) {}
@Override
public final void log(String msg, char p1, boolean p2) {}
@Override
public final void log(String msg, byte p1, boolean p2) {}
@Override
public final void log(String msg, short p1, boolean p2) {}
@Override
public final void log(String msg, int p1, boolean p2) {}
@Override
public final void log(String msg, long p1, boolean p2) {}
@Override
public final void log(String msg, float p1, boolean p2) {}
@Override
public final void log(String msg, double p1, boolean p2) {}
@Override
public final void log(String msg, boolean p1, char p2) {}
@Override
public final void log(String msg, char p1, char p2) {}
@Override
public final void log(String msg, byte p1, char p2) {}
@Override
public final void log(String msg, short p1, char p2) {}
@Override
public final void log(String msg, int p1, char p2) {}
@Override
public final void log(String msg, long p1, char p2) {}
@Override
public final void log(String msg, float p1, char p2) {}
@Override
public final void log(String msg, double p1, char p2) {}
@Override
public final void log(String msg, boolean p1, byte p2) {}
@Override
public final void log(String msg, char p1, byte p2) {}
@Override
public final void log(String msg, byte p1, byte p2) {}
@Override
public final void log(String msg, short p1, byte p2) {}
@Override
public final void log(String msg, int p1, byte p2) {}
@Override
public final void log(String msg, long p1, byte p2) {}
@Override
public final void log(String msg, float p1, byte p2) {}
@Override
public final void log(String msg, double p1, byte p2) {}
@Override
public final void log(String msg, boolean p1, short p2) {}
@Override
public final void log(String msg, char p1, short p2) {}
@Override
public final void log(String msg, byte p1, short p2) {}
@Override
public final void log(String msg, short p1, short p2) {}
@Override
public final void log(String msg, int p1, short p2) {}
@Override
public final void log(String msg, long p1, short p2) {}
@Override
public final void log(String msg, float p1, short p2) {}
@Override
public final void log(String msg, double p1, short p2) {}
@Override
public final void log(String msg, boolean p1, int p2) {}
@Override
public final void log(String msg, char p1, int p2) {}
@Override
public final void log(String msg, byte p1, int p2) {}
@Override
public final void log(String msg, short p1, int p2) {}
@Override
public final void log(String msg, int p1, int p2) {}
@Override
public final void log(String msg, long p1, int p2) {}
@Override
public final void log(String msg, float p1, int p2) {}
@Override
public final void log(String msg, double p1, int p2) {}
@Override
public final void log(String msg, boolean p1, long p2) {}
@Override
public final void log(String msg, char p1, long p2) {}
@Override
public final void log(String msg, byte p1, long p2) {}
@Override
public final void log(String msg, short p1, long p2) {}
@Override
public final void log(String msg, int p1, long p2) {}
@Override
public final void log(String msg, long p1, long p2) {}
@Override
public final void log(String msg, float p1, long p2) {}
@Override
public final void log(String msg, double p1, long p2) {}
@Override
public final void log(String msg, boolean p1, float p2) {}
@Override
public final void log(String msg, char p1, float p2) {}
@Override
public final void log(String msg, byte p1, float p2) {}
@Override
public final void log(String msg, short p1, float p2) {}
@Override
public final void log(String msg, int p1, float p2) {}
@Override
public final void log(String msg, long p1, float p2) {}
@Override
public final void log(String msg, float p1, float p2) {}
@Override
public final void log(String msg, double p1, float p2) {}
@Override
public final void log(String msg, boolean p1, double p2) {}
@Override
public final void log(String msg, char p1, double p2) {}
@Override
public final void log(String msg, byte p1, double p2) {}
@Override
public final void log(String msg, short p1, double p2) {}
@Override
public final void log(String msg, int p1, double p2) {}
@Override
public final void log(String msg, long p1, double p2) {}
@Override
public final void log(String msg, float p1, double p2) {}
@Override
public final void log(String msg, double p1, double p2) {}
}
}

View File

@@ -0,0 +1,116 @@
/*
* Copyright (C) 2006 The Android Open Source Project
*
* 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 android.util;
import android.annotation.Nullable;
public final class Log {
public @interface Level {
}
public static class TerribleFailure extends Exception {
}
public interface TerribleFailureHandler {
void onTerribleFailure(String tag, TerribleFailure what, boolean system);
}
public static int v(@Nullable String tag, String msg) {
return 0;
}
public static int v(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) {
return 0;
}
public static int d(@Nullable String tag, String msg) {
return 0;
}
public static int d(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) {
return 0;
}
public static int i(@Nullable String tag, String msg) {
return 0;
}
public static int i(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) {
return 0;
}
public static int w(@Nullable String tag, String msg) {
return 0;
}
public static int w(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) {
return 0;
}
public static native boolean isLoggable(@Nullable String tag, @Level int level);
public static int w(@Nullable String tag, @Nullable Throwable tr) {
return 0;
}
public static int e(@Nullable String tag, String msg) {
return 0;
}
public static int e(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) {
return 0;
}
public static int wtf(@Nullable String tag, @Nullable String msg) {
return 0;
}
public static int wtfStack(@Nullable String tag, @Nullable String msg) {
return 0;
}
public static int wtf(@Nullable String tag, Throwable tr) {
return 0;
}
public static int wtf(@Nullable String tag, @Nullable String msg, @Nullable Throwable tr) {
return 0;
}
public static TerribleFailureHandler setWtfHandler(TerribleFailureHandler handler) {
return null;
}
public static String getStackTraceString(@Nullable Throwable tr) {
return null;
}
public static int println(@Level int priority, @Nullable String tag, String msg) {
return 0;
}
public static native int println_native(int bufID, int priority, String tag, String msg);
public static int logToRadioBuffer(@Level int priority, @Nullable String tag,
@Nullable String message) {
return 0;
}
public static int printlns(int bufID, int priority, @Nullable String tag, String msg,
@Nullable Throwable tr) {
return 0;
}
}

View File

@@ -0,0 +1,426 @@
/*
* JBoss, Home of Professional Open Source.
*
* Copyright 2010 Red Hat, Inc., and individual contributors as indicated by the @author tags.
*
* 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 org.jboss.logging;
public interface BasicLogger {
boolean isEnabled(Logger.Level level);
boolean isTraceEnabled();
void trace(Object message);
void trace(Object message, Throwable t);
void trace(String loggerFqcn, Object message, Throwable t);
void trace(String loggerFqcn, Object message, Object[] params, Throwable t);
void tracev(String format, Object... params);
void tracev(String format, Object param1);
void tracev(String format, Object param1, Object param2);
void tracev(String format, Object param1, Object param2, Object param3);
void tracev(Throwable t, String format, Object... params);
void tracev(Throwable t, String format, Object param1);
void tracev(Throwable t, String format, Object param1, Object param2);
void tracev(Throwable t, String format, Object param1, Object param2, Object param3);
void tracef(String format, Object... params);
void tracef(String format, Object param1);
void tracef(String format, Object param1, Object param2);
void tracef(String format, Object param1, Object param2, Object param3);
void tracef(Throwable t, String format, Object... params);
void tracef(Throwable t, String format, Object param1);
void tracef(Throwable t, String format, Object param1, Object param2);
void tracef(Throwable t, String format, Object param1, Object param2, Object param3);
void tracef(String format, int arg);
void tracef(String format, int arg1, int arg2);
void tracef(String format, int arg1, Object arg2);
void tracef(String format, int arg1, int arg2, int arg3);
void tracef(String format, int arg1, int arg2, Object arg3);
void tracef(String format, int arg1, Object arg2, Object arg3);
void tracef(Throwable t, String format, int arg);
void tracef(Throwable t, String format, int arg1, int arg2);
void tracef(Throwable t, String format, int arg1, Object arg2);
void tracef(Throwable t, String format, int arg1, int arg2, int arg3);
void tracef(Throwable t, String format, int arg1, int arg2, Object arg3);
void tracef(Throwable t, String format, int arg1, Object arg2, Object arg3);
void tracef(String format, long arg);
void tracef(String format, long arg1, long arg2);
void tracef(String format, long arg1, Object arg2);
void tracef(String format, long arg1, long arg2, long arg3);
void tracef(String format, long arg1, long arg2, Object arg3);
void tracef(String format, long arg1, Object arg2, Object arg3);
void tracef(Throwable t, String format, long arg);
void tracef(Throwable t, String format, long arg1, long arg2);
void tracef(Throwable t, String format, long arg1, Object arg2);
void tracef(Throwable t, String format, long arg1, long arg2, long arg3);
void tracef(Throwable t, String format, long arg1, long arg2, Object arg3);
void tracef(Throwable t, String format, long arg1, Object arg2, Object arg3);
boolean isDebugEnabled();
void debug(Object message);
void debug(Object message, Throwable t);
void debug(String loggerFqcn, Object message, Throwable t);
void debug(String loggerFqcn, Object message, Object[] params, Throwable t);
void debugv(String format, Object... params);
void debugv(String format, Object param1);
void debugv(String format, Object param1, Object param2);
void debugv(String format, Object param1, Object param2, Object param3);
void debugv(Throwable t, String format, Object... params);
void debugv(Throwable t, String format, Object param1);
void debugv(Throwable t, String format, Object param1, Object param2);
void debugv(Throwable t, String format, Object param1, Object param2, Object param3);
void debugf(String format, Object... params);
void debugf(String format, Object param1);
void debugf(String format, Object param1, Object param2);
void debugf(String format, Object param1, Object param2, Object param3);
void debugf(Throwable t, String format, Object... params);
void debugf(Throwable t, String format, Object param1);
void debugf(Throwable t, String format, Object param1, Object param2);
void debugf(Throwable t, String format, Object param1, Object param2, Object param3);
void debugf(String format, int arg);
void debugf(String format, int arg1, int arg2);
void debugf(String format, int arg1, Object arg2);
void debugf(String format, int arg1, int arg2, int arg3);
void debugf(String format, int arg1, int arg2, Object arg3);
void debugf(String format, int arg1, Object arg2, Object arg3);
void debugf(Throwable t, String format, int arg);
void debugf(Throwable t, String format, int arg1, int arg2);
void debugf(Throwable t, String format, int arg1, Object arg2);
void debugf(Throwable t, String format, int arg1, int arg2, int arg3);
void debugf(Throwable t, String format, int arg1, int arg2, Object arg3);
void debugf(Throwable t, String format, int arg1, Object arg2, Object arg3);
void debugf(String format, long arg);
void debugf(String format, long arg1, long arg2);
void debugf(String format, long arg1, Object arg2);
void debugf(String format, long arg1, long arg2, long arg3);
void debugf(String format, long arg1, long arg2, Object arg3);
void debugf(String format, long arg1, Object arg2, Object arg3);
void debugf(Throwable t, String format, long arg);
void debugf(Throwable t, String format, long arg1, long arg2);
void debugf(Throwable t, String format, long arg1, Object arg2);
void debugf(Throwable t, String format, long arg1, long arg2, long arg3);
void debugf(Throwable t, String format, long arg1, long arg2, Object arg3);
void debugf(Throwable t, String format, long arg1, Object arg2, Object arg3);
boolean isInfoEnabled();
void info(Object message);
void info(Object message, Throwable t);
void info(String loggerFqcn, Object message, Throwable t);
void info(String loggerFqcn, Object message, Object[] params, Throwable t);
void infov(String format, Object... params);
void infov(String format, Object param1);
void infov(String format, Object param1, Object param2);
void infov(String format, Object param1, Object param2, Object param3);
void infov(Throwable t, String format, Object... params);
void infov(Throwable t, String format, Object param1);
void infov(Throwable t, String format, Object param1, Object param2);
void infov(Throwable t, String format, Object param1, Object param2, Object param3);
void infof(String format, Object... params);
void infof(String format, Object param1);
void infof(String format, Object param1, Object param2);
void infof(String format, Object param1, Object param2, Object param3);
void infof(Throwable t, String format, Object... params);
void infof(Throwable t, String format, Object param1);
void infof(Throwable t, String format, Object param1, Object param2);
void infof(Throwable t, String format, Object param1, Object param2, Object param3);
void warn(Object message);
void warn(Object message, Throwable t);
void warn(String loggerFqcn, Object message, Throwable t);
void warn(String loggerFqcn, Object message, Object[] params, Throwable t);
void warnv(String format, Object... params);
void warnv(String format, Object param1);
void warnv(String format, Object param1, Object param2);
void warnv(String format, Object param1, Object param2, Object param3);
void warnv(Throwable t, String format, Object... params);
void warnv(Throwable t, String format, Object param1);
void warnv(Throwable t, String format, Object param1, Object param2);
void warnv(Throwable t, String format, Object param1, Object param2, Object param3);
void warnf(String format, Object... params);
void warnf(String format, Object param1);
void warnf(String format, Object param1, Object param2);
void warnf(String format, Object param1, Object param2, Object param3);
void warnf(Throwable t, String format, Object... params);
void warnf(Throwable t, String format, Object param1);
void warnf(Throwable t, String format, Object param1, Object param2);
void warnf(Throwable t, String format, Object param1, Object param2, Object param3);
void error(Object message);
void error(Object message, Throwable t);
void error(String loggerFqcn, Object message, Throwable t);
void error(String loggerFqcn, Object message, Object[] params, Throwable t);
void errorv(String format, Object... params);
void errorv(String format, Object param1);
void errorv(String format, Object param1, Object param2);
void errorv(String format, Object param1, Object param2, Object param3);
void errorv(Throwable t, String format, Object... params);
void errorv(Throwable t, String format, Object param1);
void errorv(Throwable t, String format, Object param1, Object param2);
void errorv(Throwable t, String format, Object param1, Object param2, Object param3);
void errorf(String format, Object... params);
void errorf(String format, Object param1);
void errorf(String format, Object param1, Object param2);
void errorf(String format, Object param1, Object param2, Object param3);
void errorf(Throwable t, String format, Object... params);
void errorf(Throwable t, String format, Object param1);
void errorf(Throwable t, String format, Object param1, Object param2);
void errorf(Throwable t, String format, Object param1, Object param2, Object param3);
void fatal(Object message);
void fatal(Object message, Throwable t);
void fatal(String loggerFqcn, Object message, Throwable t);
void fatal(String loggerFqcn, Object message, Object[] params, Throwable t);
void fatalv(String format, Object... params);
void fatalv(String format, Object param1);
void fatalv(String format, Object param1, Object param2);
void fatalv(String format, Object param1, Object param2, Object param3);
void fatalv(Throwable t, String format, Object... params);
void fatalv(Throwable t, String format, Object param1);
void fatalv(Throwable t, String format, Object param1, Object param2);
void fatalv(Throwable t, String format, Object param1, Object param2, Object param3);
void fatalf(String format, Object... params);
void fatalf(String format, Object param1);
void fatalf(String format, Object param1, Object param2);
void fatalf(String format, Object param1, Object param2, Object param3);
void fatalf(Throwable t, String format, Object... params);
void fatalf(Throwable t, String format, Object param1);
void fatalf(Throwable t, String format, Object param1, Object param2);
void fatalf(Throwable t, String format, Object param1, Object param2, Object param3);
void log(Logger.Level level, Object message);
void log(Logger.Level level, Object message, Throwable t);
void log(Logger.Level level, String loggerFqcn, Object message, Throwable t);
void log(String loggerFqcn, Logger.Level level, Object message, Object[] params, Throwable t);
void logv(Logger.Level level, String format, Object... params);
void logv(Logger.Level level, String format, Object param1);
void logv(Logger.Level level, String format, Object param1, Object param2);
void logv(Logger.Level level, String format, Object param1, Object param2, Object param3);
void logv(Logger.Level level, Throwable t, String format, Object... params);
void logv(Logger.Level level, Throwable t, String format, Object param1);
void logv(Logger.Level level, Throwable t, String format, Object param1, Object param2);
void logv(Logger.Level level, Throwable t, String format, Object param1, Object param2,
Object param3);
void logv(String loggerFqcn, Logger.Level level, Throwable t, String format, Object... params);
void logv(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1);
void logv(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1,
Object param2);
void logv(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1,
Object param2, Object param3);
void logf(Logger.Level level, String format, Object... params);
void logf(Logger.Level level, String format, Object param1);
void logf(Logger.Level level, String format, Object param1, Object param2);
void logf(Logger.Level level, String format, Object param1, Object param2, Object param3);
void logf(Logger.Level level, Throwable t, String format, Object... params);
void logf(Logger.Level level, Throwable t, String format, Object param1);
void logf(Logger.Level level, Throwable t, String format, Object param1, Object param2);
void logf(Logger.Level level, Throwable t, String format, Object param1, Object param2,
Object param3);
void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1);
void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1,
Object param2);
void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object param1,
Object param2, Object param3);
void logf(String loggerFqcn, Logger.Level level, Throwable t, String format, Object... params);
}

View File

@@ -0,0 +1,696 @@
/*
* JBoss, Home of Professional Open Source.
*
* Copyright 2011 Red Hat, Inc.
*
* 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 org.jboss.logging;
import java.io.Serializable;
import java.util.Locale;
public abstract class Logger implements Serializable, BasicLogger {
public enum Level {
}
public String getName() {
return null;
}
public boolean isTraceEnabled() {
return false;
}
public void trace(Object message) {
}
public void trace(Object message, Throwable t) {
}
public void trace(String loggerFqcn, Object message, Throwable t) {
}
public void trace(Object message, Object[] params) {
}
public void trace(Object message, Object[] params, Throwable t) {
}
public void trace(String loggerFqcn, Object message, Object[] params, Throwable t) {
}
public void tracev(String format, Object... params) {
}
public void tracev(String format, Object param1) {
}
public void tracev(String format, Object param1, Object param2) {
}
public void tracev(String format, Object param1, Object param2, Object param3) {
}
public void tracev(Throwable t, String format, Object... params) {
}
public void tracev(Throwable t, String format, Object param1) {
}
public void tracev(Throwable t, String format, Object param1, Object param2) {
}
public void tracev(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void tracef(String format, Object... params) {
}
public void tracef(String format, Object param1) {
}
public void tracef(String format, Object param1, Object param2) {
}
public void tracef(String format, Object param1, Object param2, Object param3) {
}
public void tracef(Throwable t, String format, Object... params) {
}
public void tracef(Throwable t, String format, Object param1) {
}
public void tracef(Throwable t, String format, Object param1, Object param2) {
}
public void tracef(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void tracef(final String format, final int arg) {
}
public void tracef(final String format, final int arg1, final int arg2) {
}
public void tracef(final String format, final int arg1, final Object arg2) {
}
public void tracef(final String format, final int arg1, final int arg2, final int arg3) {
}
public void tracef(final String format, final int arg1, final int arg2, final Object arg3) {
}
public void tracef(final String format, final int arg1, final Object arg2, final Object arg3) {
}
public void tracef(final Throwable t, final String format, final int arg) {
}
public void tracef(final Throwable t, final String format, final int arg1, final int arg2) {
}
public void tracef(final Throwable t, final String format, final int arg1, final Object arg2) {
}
public void tracef(final Throwable t, final String format, final int arg1, final int arg2, final int arg3) {
}
public void tracef(final Throwable t, final String format, final int arg1, final int arg2, final Object arg3) {
}
public void tracef(final Throwable t, final String format, final int arg1, final Object arg2, final Object arg3) {
}
public void tracef(final String format, final long arg) {
}
public void tracef(final String format, final long arg1, final long arg2) {
}
public void tracef(final String format, final long arg1, final Object arg2) {
}
public void tracef(final String format, final long arg1, final long arg2, final long arg3) {
}
public void tracef(final String format, final long arg1, final long arg2, final Object arg3) {
}
public void tracef(final String format, final long arg1, final Object arg2, final Object arg3) {
}
public void tracef(final Throwable t, final String format, final long arg) {
}
public void tracef(final Throwable t, final String format, final long arg1, final long arg2) {
}
public void tracef(final Throwable t, final String format, final long arg1, final Object arg2) {
}
public void tracef(final Throwable t, final String format, final long arg1, final long arg2, final long arg3) {
}
public void tracef(final Throwable t, final String format, final long arg1, final long arg2, final Object arg3) {
}
public void tracef(final Throwable t, final String format, final long arg1, final Object arg2, final Object arg3) {
}
public boolean isDebugEnabled() {
return false;
}
public void debug(Object message) {
}
public void debug(Object message, Throwable t) {
}
public void debug(String loggerFqcn, Object message, Throwable t) {
}
public void debug(Object message, Object[] params) {
}
public void debug(Object message, Object[] params, Throwable t) {
}
public void debug(String loggerFqcn, Object message, Object[] params, Throwable t) {
}
public void debugv(String format, Object... params) {
}
public void debugv(String format, Object param1) {
}
public void debugv(String format, Object param1, Object param2) {
}
public void debugv(String format, Object param1, Object param2, Object param3) {
}
public void debugv(Throwable t, String format, Object... params) {
}
public void debugv(Throwable t, String format, Object param1) {
}
public void debugv(Throwable t, String format, Object param1, Object param2) {
}
public void debugv(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void debugf(String format, Object... params) {
}
public void debugf(String format, Object param1) {
}
public void debugf(String format, Object param1, Object param2) {
}
public void debugf(String format, Object param1, Object param2, Object param3) {
}
public void debugf(Throwable t, String format, Object... params) {
}
public void debugf(Throwable t, String format, Object param1) {
}
public void debugf(Throwable t, String format, Object param1, Object param2) {
}
public void debugf(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void debugf(final String format, final int arg) {
}
public void debugf(final String format, final int arg1, final int arg2) {
}
public void debugf(final String format, final int arg1, final Object arg2) {
}
public void debugf(final String format, final int arg1, final int arg2, final int arg3) {
}
public void debugf(final String format, final int arg1, final int arg2, final Object arg3) {
}
public void debugf(final String format, final int arg1, final Object arg2, final Object arg3) {
}
public void debugf(final Throwable t, final String format, final int arg) {
}
public void debugf(final Throwable t, final String format, final int arg1, final int arg2) {
}
public void debugf(final Throwable t, final String format, final int arg1, final Object arg2) {
}
public void debugf(final Throwable t, final String format, final int arg1, final int arg2, final int arg3) {
}
public void debugf(final Throwable t, final String format, final int arg1, final int arg2, final Object arg3) {
}
public void debugf(final Throwable t, final String format, final int arg1, final Object arg2, final Object arg3) {
}
public void debugf(final String format, final long arg) {
}
public void debugf(final String format, final long arg1, final long arg2) {
}
public void debugf(final String format, final long arg1, final Object arg2) {
}
public void debugf(final String format, final long arg1, final long arg2, final long arg3) {
}
public void debugf(final String format, final long arg1, final long arg2, final Object arg3) {
}
public void debugf(final String format, final long arg1, final Object arg2, final Object arg3) {
}
public void debugf(final Throwable t, final String format, final long arg) {
}
public void debugf(final Throwable t, final String format, final long arg1, final long arg2) {
}
public void debugf(final Throwable t, final String format, final long arg1, final Object arg2) {
}
public void debugf(final Throwable t, final String format, final long arg1, final long arg2, final long arg3) {
}
public void debugf(final Throwable t, final String format, final long arg1, final long arg2, final Object arg3) {
}
public void debugf(final Throwable t, final String format, final long arg1, final Object arg2, final Object arg3) {
}
public boolean isInfoEnabled() {
return false;
}
public void info(Object message) {
}
public void info(Object message, Throwable t) {
}
public void info(String loggerFqcn, Object message, Throwable t) {
}
public void info(Object message, Object[] params) {
}
public void info(Object message, Object[] params, Throwable t) {
}
public void info(String loggerFqcn, Object message, Object[] params, Throwable t) {
}
public void infov(String format, Object... params) {
}
public void infov(String format, Object param1) {
}
public void infov(String format, Object param1, Object param2) {
}
public void infov(String format, Object param1, Object param2, Object param3) {
}
public void infov(Throwable t, String format, Object... params) {
}
public void infov(Throwable t, String format, Object param1) {
}
public void infov(Throwable t, String format, Object param1, Object param2) {
}
public void infov(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void infof(String format, Object... params) {
}
public void infof(String format, Object param1) {
}
public void infof(String format, Object param1, Object param2) {
}
public void infof(String format, Object param1, Object param2, Object param3) {
}
public void infof(Throwable t, String format, Object... params) {
}
public void infof(Throwable t, String format, Object param1) {
}
public void infof(Throwable t, String format, Object param1, Object param2) {
}
public void infof(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void warn(Object message) {
}
public void warn(Object message, Throwable t) {
}
public void warn(String loggerFqcn, Object message, Throwable t) {
}
public void warn(Object message, Object[] params) {
}
public void warn(Object message, Object[] params, Throwable t) {
}
public void warn(String loggerFqcn, Object message, Object[] params, Throwable t) {
}
public void warnv(String format, Object... params) {
}
public void warnv(String format, Object param1) {
}
public void warnv(String format, Object param1, Object param2) {
}
public void warnv(String format, Object param1, Object param2, Object param3) {
}
public void warnv(Throwable t, String format, Object... params) {
}
public void warnv(Throwable t, String format, Object param1) {
}
public void warnv(Throwable t, String format, Object param1, Object param2) {
}
public void warnv(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void warnf(String format, Object... params) {
}
public void warnf(String format, Object param1) {
}
public void warnf(String format, Object param1, Object param2) {
}
public void warnf(String format, Object param1, Object param2, Object param3) {
}
public void warnf(Throwable t, String format, Object... params) {
}
public void warnf(Throwable t, String format, Object param1) {
}
public void warnf(Throwable t, String format, Object param1, Object param2) {
}
public void warnf(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void error(Object message) {
}
public void error(Object message, Throwable t) {
}
public void error(String loggerFqcn, Object message, Throwable t) {
}
public void error(Object message, Object[] params) {
}
public void error(Object message, Object[] params, Throwable t) {
}
public void error(String loggerFqcn, Object message, Object[] params, Throwable t) {
}
public void errorv(String format, Object... params) {
}
public void errorv(String format, Object param1) {
}
public void errorv(String format, Object param1, Object param2) {
}
public void errorv(String format, Object param1, Object param2, Object param3) {
}
public void errorv(Throwable t, String format, Object... params) {
}
public void errorv(Throwable t, String format, Object param1) {
}
public void errorv(Throwable t, String format, Object param1, Object param2) {
}
public void errorv(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void errorf(String format, Object... params) {
}
public void errorf(String format, Object param1) {
}
public void errorf(String format, Object param1, Object param2) {
}
public void errorf(String format, Object param1, Object param2, Object param3) {
}
public void errorf(Throwable t, String format, Object... params) {
}
public void errorf(Throwable t, String format, Object param1) {
}
public void errorf(Throwable t, String format, Object param1, Object param2) {
}
public void errorf(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void fatal(Object message) {
}
public void fatal(Object message, Throwable t) {
}
public void fatal(String loggerFqcn, Object message, Throwable t) {
}
public void fatal(Object message, Object[] params) {
}
public void fatal(Object message, Object[] params, Throwable t) {
}
public void fatal(String loggerFqcn, Object message, Object[] params, Throwable t) {
}
public void fatalv(String format, Object... params) {
}
public void fatalv(String format, Object param1) {
}
public void fatalv(String format, Object param1, Object param2) {
}
public void fatalv(String format, Object param1, Object param2, Object param3) {
}
public void fatalv(Throwable t, String format, Object... params) {
}
public void fatalv(Throwable t, String format, Object param1) {
}
public void fatalv(Throwable t, String format, Object param1, Object param2) {
}
public void fatalv(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void fatalf(String format, Object... params) {
}
public void fatalf(String format, Object param1) {
}
public void fatalf(String format, Object param1, Object param2) {
}
public void fatalf(String format, Object param1, Object param2, Object param3) {
}
public void fatalf(Throwable t, String format, Object... params) {
}
public void fatalf(Throwable t, String format, Object param1) {
}
public void fatalf(Throwable t, String format, Object param1, Object param2) {
}
public void fatalf(Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void log(Level level, Object message) {
}
public void log(Level level, Object message, Throwable t) {
}
public void log(Level level, String loggerFqcn, Object message, Throwable t) {
}
public void log(Level level, Object message, Object[] params) {
}
public void log(Level level, Object message, Object[] params, Throwable t) {
}
public void log(String loggerFqcn, Level level, Object message, Object[] params, Throwable t) {
}
public void logv(Level level, String format, Object... params) {
}
public void logv(Level level, String format, Object param1) {
}
public void logv(Level level, String format, Object param1, Object param2) {
}
public void logv(Level level, String format, Object param1, Object param2, Object param3) {
}
public void logv(Level level, Throwable t, String format, Object... params) {
}
public void logv(Level level, Throwable t, String format, Object param1) {
}
public void logv(Level level, Throwable t, String format, Object param1, Object param2) {
}
public void logv(Level level, Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void logv(String loggerFqcn, Level level, Throwable t, String format, Object... params) {
}
public void logv(String loggerFqcn, Level level, Throwable t, String format, Object param1) {
}
public void logv(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2) {
}
public void logv(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void logf(Level level, String format, Object... params) {
}
public void logf(Level level, String format, Object param1) {
}
public void logf(Level level, String format, Object param1, Object param2) {
}
public void logf(Level level, String format, Object param1, Object param2, Object param3) {
}
public void logf(Level level, Throwable t, String format, Object... params) {
}
public void logf(Level level, Throwable t, String format, Object param1) {
}
public void logf(Level level, Throwable t, String format, Object param1, Object param2) {
}
public void logf(Level level, Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void logf(String loggerFqcn, Level level, Throwable t, String format, Object param1) {
}
public void logf(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2) {
}
public void logf(String loggerFqcn, Level level, Throwable t, String format, Object param1, Object param2, Object param3) {
}
public void logf(String loggerFqcn, Level level, Throwable t, String format, Object... params) {
}
public static Logger getLogger(String name) {
return null;
}
public static Logger getLogger(String name, String suffix) {
return null;
}
public static Logger getLogger(Class<?> clazz) {
return null;
}
public static Logger getLogger(Class<?> clazz, String suffix) {
return null;
}
public static <T> T getMessageLogger(Class<T> type, String category) {
return null;
}
public static <T> T getMessageLogger(final Class<T> type, final String category, final Locale locale) {
return null;
}
}

View File

@@ -0,0 +1,96 @@
/*
* #%L SciJava Common shared library for SciJava software. %% Copyright (C) 2009 - 2021 SciJava
* developers. %% Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions
* and the following disclaimer. 2. Redistributions in binary form must reproduce the above
* copyright notice, this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY
* WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #L%
*/
package org.scijava.log;
public interface Logger {
default void debug(final Object msg) {}
default void debug(final Throwable t) {}
default void debug(final Object msg, final Throwable t) {}
default void error(final Object msg) {}
default void error(final Throwable t) {}
default void error(final Object msg, final Throwable t) {}
default void info(final Object msg) {}
default void info(final Throwable t) {}
default void info(final Object msg, final Throwable t) {}
default void trace(final Object msg) {}
default void trace(final Throwable t) {}
default void trace(final Object msg, final Throwable t) {}
default void warn(final Object msg) {}
default void warn(final Throwable t) {}
default void warn(final Object msg, final Throwable t) {}
default boolean isDebug() {
return false;
}
default boolean isError() {
return false;
}
default boolean isInfo() {
return false;
}
default boolean isTrace() {
return false;
}
default boolean isWarn() {
return false;
}
default boolean isLevel(final int level) {
return false;
}
default void log(final int level, final Object msg) {}
default void log(final int level, final Throwable t) {}
default void log(final int level, final Object msg, final Throwable t) {}
void alwaysLog(int level, Object msg, Throwable t);
default String getName() {
return null;
}
int getLevel();
default Logger subLogger(String name) {
return null;
}
}

View File

@@ -0,0 +1,177 @@
/**
* Copyright (c) 2004-2021 QOS.ch All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package org.slf4j;
import org.slf4j.event.Level;
import org.slf4j.spi.LoggingEventBuilder;
public interface Logger {
public String getName();
default public LoggingEventBuilder makeLoggingEventBuilder(Level level) {
return null;
}
default public boolean isEnabledForLevel(Level level) {
return false;
}
public boolean isTraceEnabled();
public void trace(String msg);
public void trace(String format, Object arg);
public void trace(String format, Object arg1, Object arg2);
public void trace(String format, Object... arguments);
public void trace(String msg, Throwable t);
public boolean isTraceEnabled(Marker marker);
default public LoggingEventBuilder atTrace() {
return null;
}
public void trace(Marker marker, String msg);
public void trace(Marker marker, String format, Object arg);
public void trace(Marker marker, String format, Object arg1, Object arg2);
public void trace(Marker marker, String format, Object... argArray);
public void trace(Marker marker, String msg, Throwable t);
public boolean isDebugEnabled();
public void debug(String msg);
public void debug(String format, Object arg);
public void debug(String format, Object arg1, Object arg2);
public void debug(String format, Object... arguments);
public void debug(String msg, Throwable t);
public boolean isDebugEnabled(Marker marker);
public void debug(Marker marker, String msg);
public void debug(Marker marker, String format, Object arg);
public void debug(Marker marker, String format, Object arg1, Object arg2);
public void debug(Marker marker, String format, Object... arguments);
public void debug(Marker marker, String msg, Throwable t);
default public LoggingEventBuilder atDebug() {
return null;
}
public boolean isInfoEnabled();
public void info(String msg);
public void info(String format, Object arg);
public void info(String format, Object arg1, Object arg2);
public void info(String format, Object... arguments);
public void info(String msg, Throwable t);
public boolean isInfoEnabled(Marker marker);
public void info(Marker marker, String msg);
public void info(Marker marker, String format, Object arg);
public void info(Marker marker, String format, Object arg1, Object arg2);
public void info(Marker marker, String format, Object... arguments);
public void info(Marker marker, String msg, Throwable t);
default public LoggingEventBuilder atInfo() {
return null;
}
public boolean isWarnEnabled();
public void warn(String msg);
public void warn(String format, Object arg);
public void warn(String format, Object... arguments);
public void warn(String format, Object arg1, Object arg2);
public void warn(String msg, Throwable t);
public boolean isWarnEnabled(Marker marker);
public void warn(Marker marker, String msg);
public void warn(Marker marker, String format, Object arg);
public void warn(Marker marker, String format, Object arg1, Object arg2);
public void warn(Marker marker, String format, Object... arguments);
public void warn(Marker marker, String msg, Throwable t);
default public LoggingEventBuilder atWarn() {
return null;
}
public boolean isErrorEnabled();
public void error(String msg);
public void error(String format, Object arg);
public void error(String format, Object arg1, Object arg2);
public void error(String format, Object... arguments);
public void error(String msg, Throwable t);
public boolean isErrorEnabled(Marker marker);
public void error(Marker marker, String msg);
public void error(Marker marker, String format, Object arg);
public void error(Marker marker, String format, Object arg1, Object arg2);
public void error(Marker marker, String format, Object... arguments);
public void error(Marker marker, String msg, Throwable t);
default public LoggingEventBuilder atError() {
return null;
}
}

View File

@@ -0,0 +1,46 @@
/**
* Copyright (c) 2004-2011 QOS.ch All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package org.slf4j;
import java.io.Serializable;
import java.util.Iterator;
public interface Marker extends Serializable {
public String getName();
public void add(Marker reference);
public boolean remove(Marker reference);
public boolean hasChildren();
public boolean hasReferences();
public Iterator<Marker> iterator();
public boolean contains(Marker other);
public boolean contains(String name);
public boolean equals(Object o);
public int hashCode();
}

View File

@@ -0,0 +1,17 @@
package org.slf4j.event;
public enum Level {
;
public int toInt() {
return 0;
}
public static Level intToLevel(int levelInt) {
return null;
}
public String toString() {
return null;
}
}

View File

@@ -0,0 +1,48 @@
/**
* Copyright (c) 2004-2021 QOS.ch All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
* associated documentation files (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all copies or
* substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*
*/
package org.slf4j.spi;
import java.util.function.Supplier;
import org.slf4j.Marker;
public interface LoggingEventBuilder {
LoggingEventBuilder setCause(Throwable cause);
LoggingEventBuilder addMarker(Marker marker);
LoggingEventBuilder addArgument(Object p);
LoggingEventBuilder addArgument(Supplier<?> objectSupplier);
LoggingEventBuilder addKeyValue(String key, Object value);
LoggingEventBuilder addKeyValue(String key, Supplier<Object> value);
void log(String message);
void log(String message, Object arg);
void log(String message, Object arg0, Object arg1);
void log(String message, Object... args);
void log(Supplier<String> messageSupplier);
}