Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
Source Code for SLF4J Simple Logging
SLF4J Simple Logging is a simple logging library that
implements the SLF4J API.
Here is the source code for SLF4J Simple Logging 2.0.4. You can download its pre-compiled version slf4j-simple-2.0.4.jar at SLF4J Download Website.
✍:
⏎ org/slf4j/simple/OutputChoice.java
package org.slf4j.simple;
import java.io.PrintStream;
/**
* This class encapsulates the user's choice of output target.
*
* @author Ceki Gülcü
*
*/
class OutputChoice {
enum OutputChoiceType {
SYS_OUT, CACHED_SYS_OUT, SYS_ERR, CACHED_SYS_ERR, FILE;
}
final OutputChoiceType outputChoiceType;
final PrintStream targetPrintStream;
OutputChoice(OutputChoiceType outputChoiceType) {
if (outputChoiceType == OutputChoiceType.FILE) {
throw new IllegalArgumentException();
}
this.outputChoiceType = outputChoiceType;
if (outputChoiceType == OutputChoiceType.CACHED_SYS_OUT) {
this.targetPrintStream = System.out;
} else if (outputChoiceType == OutputChoiceType.CACHED_SYS_ERR) {
this.targetPrintStream = System.err;
} else {
this.targetPrintStream = null;
}
}
OutputChoice(PrintStream printStream) {
this.outputChoiceType = OutputChoiceType.FILE;
this.targetPrintStream = printStream;
}
PrintStream getTargetPrintStream() {
switch (outputChoiceType) {
case SYS_OUT:
return System.out;
case SYS_ERR:
return System.err;
case CACHED_SYS_ERR:
case CACHED_SYS_OUT:
case FILE:
return targetPrintStream;
default:
throw new IllegalArgumentException();
}
}
}
⏎ org/slf4j/simple/OutputChoice.java
Or download all of them as a single archive file:
File name: slf4j-simple-2.0.4-sources.jar File size: 12080 bytes Release date: 2022-11-17 Download
⇒ Source Code for SLF4J Bridge to JDK
2021-11-30, ∼4578🔥, 0💬
Popular Posts:
JDK 6 tools.jar is the JAR file for JDK 6 tools. It contains Java classes to support different JDK t...
How to download and install JDK (Java Development Kit) 8? If you want to write Java applications, yo...
Apache Log4j API provides the interface that applications should code to and provides the adapter co...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
JDK 11 java.smartcardio.jmod is the JMOD file for JDK 11 Smartcardio module. JDK 11 Smart Card IO mo...