repo
stringlengths
7
58
path
stringlengths
12
218
func_name
stringlengths
3
140
original_string
stringlengths
73
34.1k
language
stringclasses
1 value
code
stringlengths
73
34.1k
code_tokens
list
docstring
stringlengths
3
16k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
105
339
partition
stringclasses
1 value
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/pattern/ExtrasPatternParser.java
ExtrasPatternParser.createConverter
private static PatternConverter createConverter( final String converterId, final StringBuffer currentLiteral, final Map converterRegistry, final Map rules, final List options) { String converterName = converterId; Object converterObj = null; for (int i = converterId.length(); (i > 0) && (converterO...
java
private static PatternConverter createConverter( final String converterId, final StringBuffer currentLiteral, final Map converterRegistry, final Map rules, final List options) { String converterName = converterId; Object converterObj = null; for (int i = converterId.length(); (i > 0) && (converterO...
[ "private", "static", "PatternConverter", "createConverter", "(", "final", "String", "converterId", ",", "final", "StringBuffer", "currentLiteral", ",", "final", "Map", "converterRegistry", ",", "final", "Map", "rules", ",", "final", "List", "options", ")", "{", "S...
Creates a new PatternConverter. @param converterId converterId. @param currentLiteral literal to be used if converter is unrecognized or following converter if converterId contains extra characters. @param converterRegistry map of user-supported pattern converters keyed by format specifier, may be null. @param rules ...
[ "Creates", "a", "new", "PatternConverter", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/pattern/ExtrasPatternParser.java#L439-L531
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/pattern/ExtrasPatternParser.java
ExtrasPatternParser.finalizeConverter
private static int finalizeConverter( char c, String pattern, int i, final StringBuffer currentLiteral, final ExtrasFormattingInfo formattingInfo, final Map converterRegistry, final Map rules, final List patternConverters, final List formattingInfos) { StringBuffer convBuf = new StringBuffer(); ...
java
private static int finalizeConverter( char c, String pattern, int i, final StringBuffer currentLiteral, final ExtrasFormattingInfo formattingInfo, final Map converterRegistry, final Map rules, final List patternConverters, final List formattingInfos) { StringBuffer convBuf = new StringBuffer(); ...
[ "private", "static", "int", "finalizeConverter", "(", "char", "c", ",", "String", "pattern", ",", "int", "i", ",", "final", "StringBuffer", "currentLiteral", ",", "final", "ExtrasFormattingInfo", "formattingInfo", ",", "final", "Map", "converterRegistry", ",", "fi...
Processes a format specifier sequence. @param c initial character of format specifier. @param pattern conversion pattern @param i current position in conversion pattern. @param currentLiteral current literal. @param formattingInfo current field specifier. @param converterRegistry map of user-provided pattern converter...
[ "Processes", "a", "format", "specifier", "sequence", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/pattern/ExtrasPatternParser.java#L547-L598
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
StructuredDataId.makeId
public StructuredDataId makeId(final StructuredDataId id) { if (id == null) { return this; } return makeId(id.getName(), id.getEnterpriseNumber()); }
java
public StructuredDataId makeId(final StructuredDataId id) { if (id == null) { return this; } return makeId(id.getName(), id.getEnterpriseNumber()); }
[ "public", "StructuredDataId", "makeId", "(", "final", "StructuredDataId", "id", ")", "{", "if", "(", "id", "==", "null", ")", "{", "return", "this", ";", "}", "return", "makeId", "(", "id", ".", "getName", "(", ")", ",", "id", ".", "getEnterpriseNumber",...
Creates an id using another id to supply default values. @param id The original StructuredDataId. @return the new StructuredDataId.
[ "Creates", "an", "id", "using", "another", "id", "to", "supply", "default", "values", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java#L170-L175
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
StructuredDataId.makeId
public StructuredDataId makeId(final String defaultId, final int anEnterpriseNumber) { String id; String[] req; String[] opt; if (anEnterpriseNumber <= 0) { return this; } if (this.name != null) { id = this.name; req = this.required; ...
java
public StructuredDataId makeId(final String defaultId, final int anEnterpriseNumber) { String id; String[] req; String[] opt; if (anEnterpriseNumber <= 0) { return this; } if (this.name != null) { id = this.name; req = this.required; ...
[ "public", "StructuredDataId", "makeId", "(", "final", "String", "defaultId", ",", "final", "int", "anEnterpriseNumber", ")", "{", "String", "id", ";", "String", "[", "]", "req", ";", "String", "[", "]", "opt", ";", "if", "(", "anEnterpriseNumber", "<=", "0...
Creates an id based on the current id. @param defaultId The default id to use if this StructuredDataId doesn't have a name. @param anEnterpriseNumber The enterprise number. @return a StructuredDataId.
[ "Creates", "an", "id", "based", "on", "the", "current", "id", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java#L184-L202
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java
StructuredDataMessage.getFormats
@Override public String[] getFormats() { final String[] formats = new String[Format.values().length]; int i = 0; for (final Format format : Format.values()) { formats[i++] = format.name(); } return formats; }
java
@Override public String[] getFormats() { final String[] formats = new String[Format.values().length]; int i = 0; for (final Format format : Format.values()) { formats[i++] = format.name(); } return formats; }
[ "@", "Override", "public", "String", "[", "]", "getFormats", "(", ")", "{", "final", "String", "[", "]", "formats", "=", "new", "String", "[", "Format", ".", "values", "(", ")", ".", "length", "]", ";", "int", "i", "=", "0", ";", "for", "(", "fin...
Returns the supported formats. @return An array of the supported format names.
[ "Returns", "the", "supported", "formats", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java#L202-L210
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/ThreadDumpMessage.java
ThreadDumpMessage.getFormattedMessage
@Override public String getFormattedMessage() { if (formattedMessage != null) { return formattedMessage; } final StringBuilder sb = new StringBuilder(255); formatTo(sb); return sb.toString(); }
java
@Override public String getFormattedMessage() { if (formattedMessage != null) { return formattedMessage; } final StringBuilder sb = new StringBuilder(255); formatTo(sb); return sb.toString(); }
[ "@", "Override", "public", "String", "getFormattedMessage", "(", ")", "{", "if", "(", "formattedMessage", "!=", "null", ")", "{", "return", "formattedMessage", ";", "}", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", "255", ")", ";", "form...
Returns the ThreadDump in printable format. @return the ThreadDump suitable for logging.
[ "Returns", "the", "ThreadDump", "in", "printable", "format", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/ThreadDumpMessage.java#L90-L98
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/ReusableParameterizedMessage.java
ReusableParameterizedMessage.swapParameters
@Override public Object[] swapParameters(final Object[] emptyReplacement) { Object[] result; if (varargs == null) { result = params; if (emptyReplacement.length >= MAX_PARMS) { params = emptyReplacement; } else { // Bad replacement!...
java
@Override public Object[] swapParameters(final Object[] emptyReplacement) { Object[] result; if (varargs == null) { result = params; if (emptyReplacement.length >= MAX_PARMS) { params = emptyReplacement; } else { // Bad replacement!...
[ "@", "Override", "public", "Object", "[", "]", "swapParameters", "(", "final", "Object", "[", "]", "emptyReplacement", ")", "{", "Object", "[", "]", "result", ";", "if", "(", "varargs", "==", "null", ")", "{", "result", "=", "params", ";", "if", "(", ...
see interface javadoc
[ "see", "interface", "javadoc" ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/ReusableParameterizedMessage.java#L64-L99
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/DailyZipRollingFileAppender.java
DailyZipRollingFileAppender.rollOver
void rollOver() throws IOException { // If compression is enabled we start a separated thread if (getCompressBackups().equalsIgnoreCase("YES") || getCompressBackups().equalsIgnoreCase("TRUE")) { File file = new File(fileName); Thread fileCompressor = new Thread(new CompressFile(file)); fileComp...
java
void rollOver() throws IOException { // If compression is enabled we start a separated thread if (getCompressBackups().equalsIgnoreCase("YES") || getCompressBackups().equalsIgnoreCase("TRUE")) { File file = new File(fileName); Thread fileCompressor = new Thread(new CompressFile(file)); fileComp...
[ "void", "rollOver", "(", ")", "throws", "IOException", "{", "// If compression is enabled we start a separated thread\r", "if", "(", "getCompressBackups", "(", ")", ".", "equalsIgnoreCase", "(", "\"YES\"", ")", "||", "getCompressBackups", "(", ")", ".", "equalsIgnoreCas...
Rollover the current file to a new file.
[ "Rollover", "the", "current", "file", "to", "a", "new", "file", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/DailyZipRollingFileAppender.java#L498-L523
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/DailyZipRollingFileAppender.java
DailyZipRollingFileAppender.subAppend
protected void subAppend(LoggingEvent event) { long n = event.timeStamp; if (n >= nextCheck) { try { now.setTime(n); cleanupAndRollOver(); } catch (IOException ioe) { if (ioe instanceof InterruptedIOException) { Thread.currentThread().interrupt(); } LogLog.error("rollOver() ...
java
protected void subAppend(LoggingEvent event) { long n = event.timeStamp; if (n >= nextCheck) { try { now.setTime(n); cleanupAndRollOver(); } catch (IOException ioe) { if (ioe instanceof InterruptedIOException) { Thread.currentThread().interrupt(); } LogLog.error("rollOver() ...
[ "protected", "void", "subAppend", "(", "LoggingEvent", "event", ")", "{", "long", "n", "=", "event", ".", "timeStamp", ";", "if", "(", "n", ">=", "nextCheck", ")", "{", "try", "{", "now", ".", "setTime", "(", "n", ")", ";", "cleanupAndRollOver", "(", ...
This method differentiates DailyRollingFileAppender from its super class. <p> Before actually logging, this method will check whether it is time to do a rollover. If it is, it will schedule the next rollover time and then rollover.
[ "This", "method", "differentiates", "DailyRollingFileAppender", "from", "its", "super", "class", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/DailyZipRollingFileAppender.java#L549-L563
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/BasicThreadInformation.java
BasicThreadInformation.printThreadInfo
@Override public void printThreadInfo(final StringBuilder sb) { StringBuilders.appendDqValue(sb, name).append(Chars.SPACE); if (isDaemon) { sb.append("daemon "); } sb.append("prio=").append(priority).append(" tid=").append(id).append(' '); if (threadGroupName != n...
java
@Override public void printThreadInfo(final StringBuilder sb) { StringBuilders.appendDqValue(sb, name).append(Chars.SPACE); if (isDaemon) { sb.append("daemon "); } sb.append("prio=").append(priority).append(" tid=").append(id).append(' '); if (threadGroupName != n...
[ "@", "Override", "public", "void", "printThreadInfo", "(", "final", "StringBuilder", "sb", ")", "{", "StringBuilders", ".", "appendDqValue", "(", "sb", ",", "name", ")", ".", "append", "(", "Chars", ".", "SPACE", ")", ";", "if", "(", "isDaemon", ")", "{"...
Print the thread information. @param sb The StringBuilder.
[ "Print", "the", "thread", "information", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/BasicThreadInformation.java#L85-L97
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/BasicThreadInformation.java
BasicThreadInformation.printStack
@Override public void printStack(final StringBuilder sb, final StackTraceElement[] trace) { for (final StackTraceElement element : trace) { sb.append("\tat ").append(element).append('\n'); } }
java
@Override public void printStack(final StringBuilder sb, final StackTraceElement[] trace) { for (final StackTraceElement element : trace) { sb.append("\tat ").append(element).append('\n'); } }
[ "@", "Override", "public", "void", "printStack", "(", "final", "StringBuilder", "sb", ",", "final", "StackTraceElement", "[", "]", "trace", ")", "{", "for", "(", "final", "StackTraceElement", "element", ":", "trace", ")", "{", "sb", ".", "append", "(", "\"...
Format the StackTraceElements. @param sb The StringBuilder. @param trace The stack trace element array to format.
[ "Format", "the", "StackTraceElements", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/BasicThreadInformation.java#L104-L109
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/receivers/db/DBReceiverJob.java
DBReceiverJob.getProperties
void getProperties(Connection connection, long id, LoggingEvent event) throws SQLException { PreparedStatement statement = connection.prepareStatement(sqlProperties); try { statement.setLong(1, id); ResultSet rs = statement.executeQuery(); while (rs.next()) { String key = rs.ge...
java
void getProperties(Connection connection, long id, LoggingEvent event) throws SQLException { PreparedStatement statement = connection.prepareStatement(sqlProperties); try { statement.setLong(1, id); ResultSet rs = statement.executeQuery(); while (rs.next()) { String key = rs.ge...
[ "void", "getProperties", "(", "Connection", "connection", ",", "long", "id", ",", "LoggingEvent", "event", ")", "throws", "SQLException", "{", "PreparedStatement", "statement", "=", "connection", ".", "prepareStatement", "(", "sqlProperties", ")", ";", "try", "{",...
Retrieve the event properties from the logging_event_property table. @param connection @param id @param event @throws SQLException
[ "Retrieve", "the", "event", "properties", "from", "the", "logging_event_property", "table", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/receivers/db/DBReceiverJob.java#L172-L188
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/receivers/db/DBReceiverJob.java
DBReceiverJob.getException
ThrowableInformation getException(Connection connection, long id) throws SQLException { PreparedStatement statement = null; try { statement = connection.prepareStatement(sqlException); statement.setLong(1, id); ResultSet rs = statement.executeQuery(); Vector v = new Vector(); ...
java
ThrowableInformation getException(Connection connection, long id) throws SQLException { PreparedStatement statement = null; try { statement = connection.prepareStatement(sqlException); statement.setLong(1, id); ResultSet rs = statement.executeQuery(); Vector v = new Vector(); ...
[ "ThrowableInformation", "getException", "(", "Connection", "connection", ",", "long", "id", ")", "throws", "SQLException", "{", "PreparedStatement", "statement", "=", "null", ";", "try", "{", "statement", "=", "connection", ".", "prepareStatement", "(", "sqlExceptio...
Retrieve the exception string representation from the logging_event_exception table. @param connection @param id @throws SQLException
[ "Retrieve", "the", "exception", "string", "representation", "from", "the", "logging_event_exception", "table", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/receivers/db/DBReceiverJob.java#L198-L227
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/log4j/Priority.java
Priority.getAllPossiblePriorities
public static Priority[] getAllPossiblePriorities() { return new Priority[]{ Priority.FATAL, Priority.ERROR, Level.WARN, Priority.INFO, Priority.DEBUG, Level.TRACE }; }
java
public static Priority[] getAllPossiblePriorities() { return new Priority[]{ Priority.FATAL, Priority.ERROR, Level.WARN, Priority.INFO, Priority.DEBUG, Level.TRACE }; }
[ "public", "static", "Priority", "[", "]", "getAllPossiblePriorities", "(", ")", "{", "return", "new", "Priority", "[", "]", "{", "Priority", ".", "FATAL", ",", "Priority", ".", "ERROR", ",", "Level", ".", "WARN", ",", "Priority", ".", "INFO", ",", "Prior...
Return all possible priorities as an array of Level objects in descending order. @deprecated This method will be removed with no replacement. @return TODO
[ "Return", "all", "possible", "priorities", "as", "an", "array", "of", "Level", "objects", "in", "descending", "order", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/log4j/Priority.java#L140-L146
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/LogManager.java
LogManager.shutdown
public static void shutdown(final LoggerContext context) { if (context != null && context instanceof Terminable) { ((Terminable) context).terminate(); } }
java
public static void shutdown(final LoggerContext context) { if (context != null && context instanceof Terminable) { ((Terminable) context).terminate(); } }
[ "public", "static", "void", "shutdown", "(", "final", "LoggerContext", "context", ")", "{", "if", "(", "context", "!=", "null", "&&", "context", "instanceof", "Terminable", ")", "{", "(", "(", "Terminable", ")", "context", ")", ".", "terminate", "(", ")", ...
Shutdown the logging system if the logging system supports it. This call is synchronous and will block until shut down is complete. This may include flushing pending log events over network connections. @param context the LoggerContext. @since 2.6
[ "Shutdown", "the", "logging", "system", "if", "the", "logging", "system", "supports", "it", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/LogManager.java#L319-L323
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/LogManager.java
LogManager.getLogger
public static Logger getLogger(final Class<?> clazz) { final Class<?> cls = callerClass(clazz); return getContext(cls.getClassLoader(), false).getLogger(cls.getCanonicalName()); }
java
public static Logger getLogger(final Class<?> clazz) { final Class<?> cls = callerClass(clazz); return getContext(cls.getClassLoader(), false).getLogger(cls.getCanonicalName()); }
[ "public", "static", "Logger", "getLogger", "(", "final", "Class", "<", "?", ">", "clazz", ")", "{", "final", "Class", "<", "?", ">", "cls", "=", "callerClass", "(", "clazz", ")", ";", "return", "getContext", "(", "cls", ".", "getClassLoader", "(", ")",...
Returns a Logger using the fully qualified name of the Class as the Logger name. @param clazz The Class whose name should be used as the Logger name. If null it will default to the calling class. @return The Logger. @throws UnsupportedOperationException if {@code clazz} is {@code null} and the calling class cannot be ...
[ "Returns", "a", "Logger", "using", "the", "fully", "qualified", "name", "of", "the", "Class", "as", "the", "Logger", "name", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/LogManager.java#L491-L494
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/LogManager.java
LogManager.getLogger
public static Logger getLogger(final Object value) { return getLogger(value != null ? value.getClass() : StackLocatorUtil.getCallerClass(2)); }
java
public static Logger getLogger(final Object value) { return getLogger(value != null ? value.getClass() : StackLocatorUtil.getCallerClass(2)); }
[ "public", "static", "Logger", "getLogger", "(", "final", "Object", "value", ")", "{", "return", "getLogger", "(", "value", "!=", "null", "?", "value", ".", "getClass", "(", ")", ":", "StackLocatorUtil", ".", "getCallerClass", "(", "2", ")", ")", ";", "}"...
Returns a Logger using the fully qualified class name of the value as the Logger name. @param value The value whose class name should be used as the Logger name. If null the name of the calling class will be used as the logger name. @return The Logger. @throws UnsupportedOperationException if {@code value} is {@code n...
[ "Returns", "a", "Logger", "using", "the", "fully", "qualified", "class", "name", "of", "the", "value", "as", "the", "Logger", "name", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/LogManager.java#L533-L535
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/config/PaxPropertySetter.java
PaxPropertySetter.setProperty
public void setProperty(String name, String value) { if (value == null) return; name = Introspector.decapitalize(name); PropertyDescriptor prop = getPropertyDescriptor(name); //LogLog.debug("---------Key: "+name+", type="+prop.getPropertyType()); if (prop == null) { LogLog.warn("No such p...
java
public void setProperty(String name, String value) { if (value == null) return; name = Introspector.decapitalize(name); PropertyDescriptor prop = getPropertyDescriptor(name); //LogLog.debug("---------Key: "+name+", type="+prop.getPropertyType()); if (prop == null) { LogLog.warn("No such p...
[ "public", "void", "setProperty", "(", "String", "name", ",", "String", "value", ")", "{", "if", "(", "value", "==", "null", ")", "return", ";", "name", "=", "Introspector", ".", "decapitalize", "(", "name", ")", ";", "PropertyDescriptor", "prop", "=", "g...
Set a property on this PaxPropertySetter's Object. If successful, this method will invoke a setter method on the underlying Object. The setter is the one for the specified property name and the value is determined partly from the setter argument type and partly from the value specified in the call to this method. <p>I...
[ "Set", "a", "property", "on", "this", "PaxPropertySetter", "s", "Object", ".", "If", "successful", "this", "method", "will", "invoke", "a", "setter", "method", "on", "the", "underlying", "Object", ".", "The", "setter", "is", "the", "one", "for", "the", "sp...
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/config/PaxPropertySetter.java#L255-L275
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.loadClose
static Properties loadClose(final InputStream in, final Object source) { final Properties props = new Properties(); if (null != in) { try { props.load(in); } catch (final IOException e) { LowLevelLogUtil.logException("Unable to read " + source, e);...
java
static Properties loadClose(final InputStream in, final Object source) { final Properties props = new Properties(); if (null != in) { try { props.load(in); } catch (final IOException e) { LowLevelLogUtil.logException("Unable to read " + source, e);...
[ "static", "Properties", "loadClose", "(", "final", "InputStream", "in", ",", "final", "Object", "source", ")", "{", "final", "Properties", "props", "=", "new", "Properties", "(", ")", ";", "if", "(", "null", "!=", "in", ")", "{", "try", "{", "props", "...
Loads and closes the given property input stream. If an error occurs, log to the status logger. @param in a property input stream. @param source a source object describing the source, like a resource string or a URL. @return a new Properties object
[ "Loads", "and", "closes", "the", "given", "property", "input", "stream", ".", "If", "an", "error", "occurs", "log", "to", "the", "status", "logger", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L77-L93
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.getCharsetProperty
public Charset getCharsetProperty(final String name, final Charset defaultValue) { final String prop = getStringProperty(name); try { return prop == null ? defaultValue : Charset.forName(prop); } catch (UnsupportedCharsetException e) { LowLevelLogUtil.logException("Unable...
java
public Charset getCharsetProperty(final String name, final Charset defaultValue) { final String prop = getStringProperty(name); try { return prop == null ? defaultValue : Charset.forName(prop); } catch (UnsupportedCharsetException e) { LowLevelLogUtil.logException("Unable...
[ "public", "Charset", "getCharsetProperty", "(", "final", "String", "name", ",", "final", "Charset", "defaultValue", ")", "{", "final", "String", "prop", "=", "getStringProperty", "(", "name", ")", ";", "try", "{", "return", "prop", "==", "null", "?", "defaul...
Gets the named property as a Charset value. @param name the name of the property to look up @param defaultValue the default value to use if the property is undefined @return the Charset value of the property or {@code defaultValue} if undefined.
[ "Gets", "the", "named", "property", "as", "a", "Charset", "value", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L169-L177
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.getDoubleProperty
public double getDoubleProperty(final String name, final double defaultValue) { final String prop = getStringProperty(name); if (prop != null) { try { return Double.parseDouble(prop); } catch (final Exception ignored) { return defaultValue; ...
java
public double getDoubleProperty(final String name, final double defaultValue) { final String prop = getStringProperty(name); if (prop != null) { try { return Double.parseDouble(prop); } catch (final Exception ignored) { return defaultValue; ...
[ "public", "double", "getDoubleProperty", "(", "final", "String", "name", ",", "final", "double", "defaultValue", ")", "{", "final", "String", "prop", "=", "getStringProperty", "(", "name", ")", ";", "if", "(", "prop", "!=", "null", ")", "{", "try", "{", ...
Gets the named property as a double. @param name the name of the property to look up @param defaultValue the default value to use if the property is undefined @return the parsed double value of the property or {@code defaultValue} if it was undefined or could not be parsed.
[ "Gets", "the", "named", "property", "as", "a", "double", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L186-L196
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.getIntegerProperty
public int getIntegerProperty(final String name, final int defaultValue) { final String prop = getStringProperty(name); if (prop != null) { try { return Integer.parseInt(prop); } catch (final Exception ignored) { return defaultValue; } ...
java
public int getIntegerProperty(final String name, final int defaultValue) { final String prop = getStringProperty(name); if (prop != null) { try { return Integer.parseInt(prop); } catch (final Exception ignored) { return defaultValue; } ...
[ "public", "int", "getIntegerProperty", "(", "final", "String", "name", ",", "final", "int", "defaultValue", ")", "{", "final", "String", "prop", "=", "getStringProperty", "(", "name", ")", ";", "if", "(", "prop", "!=", "null", ")", "{", "try", "{", "retu...
Gets the named property as an integer. @param name the name of the property to look up @param defaultValue the default value to use if the property is undefined @return the parsed integer value of the property or {@code defaultValue} if it was undefined or could not be parsed.
[ "Gets", "the", "named", "property", "as", "an", "integer", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L206-L216
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.getLongProperty
public long getLongProperty(final String name, final long defaultValue) { final String prop = getStringProperty(name); if (prop != null) { try { return Long.parseLong(prop); } catch (final Exception ignored) { return defaultValue; } ...
java
public long getLongProperty(final String name, final long defaultValue) { final String prop = getStringProperty(name); if (prop != null) { try { return Long.parseLong(prop); } catch (final Exception ignored) { return defaultValue; } ...
[ "public", "long", "getLongProperty", "(", "final", "String", "name", ",", "final", "long", "defaultValue", ")", "{", "final", "String", "prop", "=", "getStringProperty", "(", "name", ")", ";", "if", "(", "prop", "!=", "null", ")", "{", "try", "{", "retur...
Gets the named property as a long. @param name the name of the property to look up @param defaultValue the default value to use if the property is undefined @return the parsed long value of the property or {@code defaultValue} if it was undefined or could not be parsed.
[ "Gets", "the", "named", "property", "as", "a", "long", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L225-L235
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.getStringProperty
public String getStringProperty(final String name) { String prop = null; try { prop = System.getProperty(name); } catch (final SecurityException ignored) { // Ignore } return prop == null ? props.getProperty(name) : prop; }
java
public String getStringProperty(final String name) { String prop = null; try { prop = System.getProperty(name); } catch (final SecurityException ignored) { // Ignore } return prop == null ? props.getProperty(name) : prop; }
[ "public", "String", "getStringProperty", "(", "final", "String", "name", ")", "{", "String", "prop", "=", "null", ";", "try", "{", "prop", "=", "System", ".", "getProperty", "(", "name", ")", ";", "}", "catch", "(", "final", "SecurityException", "ignored",...
Gets the named property as a String. @param name the name of the property to look up @return the String value of the property or {@code null} if undefined.
[ "Gets", "the", "named", "property", "as", "a", "String", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L243-L251
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.getSystemProperties
public static Properties getSystemProperties() { try { return new Properties(System.getProperties()); } catch (final SecurityException ex) { LowLevelLogUtil.logException("Unable to access system properties.", ex); // Sandboxed - can't read System Properties ...
java
public static Properties getSystemProperties() { try { return new Properties(System.getProperties()); } catch (final SecurityException ex) { LowLevelLogUtil.logException("Unable to access system properties.", ex); // Sandboxed - can't read System Properties ...
[ "public", "static", "Properties", "getSystemProperties", "(", ")", "{", "try", "{", "return", "new", "Properties", "(", "System", ".", "getProperties", "(", ")", ")", ";", "}", "catch", "(", "final", "SecurityException", "ex", ")", "{", "LowLevelLogUtil", "....
Return the system properties or an empty Properties object if an error occurs. @return The system properties.
[ "Return", "the", "system", "properties", "or", "an", "empty", "Properties", "object", "if", "an", "error", "occurs", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L270-L278
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.extractSubset
public static Properties extractSubset(final Properties properties, final String prefix) { final Properties subset = new Properties(); if (prefix == null || prefix.length() == 0) { return subset; } final String prefixToMatch = prefix.charAt(prefix.length() - 1) != '.' ? pre...
java
public static Properties extractSubset(final Properties properties, final String prefix) { final Properties subset = new Properties(); if (prefix == null || prefix.length() == 0) { return subset; } final String prefixToMatch = prefix.charAt(prefix.length() - 1) != '.' ? pre...
[ "public", "static", "Properties", "extractSubset", "(", "final", "Properties", "properties", ",", "final", "String", "prefix", ")", "{", "final", "Properties", "subset", "=", "new", "Properties", "(", ")", ";", "if", "(", "prefix", "==", "null", "||", "prefi...
Extracts properties that start with or are equals to the specific prefix and returns them in a new Properties object with the prefix removed. @param properties The Properties to evaluate. @param prefix The prefix to extract. @return The subset of properties.
[ "Extracts", "properties", "that", "start", "with", "or", "are", "equals", "to", "the", "specific", "prefix", "and", "returns", "them", "in", "a", "new", "Properties", "object", "with", "the", "prefix", "removed", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L288-L310
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java
PropertiesUtil.partitionOnCommonPrefixes
public static Map<String, Properties> partitionOnCommonPrefixes(final Properties properties) { final Map<String, Properties> parts = new ConcurrentHashMap<>(); for (final String key : properties.stringPropertyNames()) { final String prefix = key.substring(0, key.indexOf('.')); if...
java
public static Map<String, Properties> partitionOnCommonPrefixes(final Properties properties) { final Map<String, Properties> parts = new ConcurrentHashMap<>(); for (final String key : properties.stringPropertyNames()) { final String prefix = key.substring(0, key.indexOf('.')); if...
[ "public", "static", "Map", "<", "String", ",", "Properties", ">", "partitionOnCommonPrefixes", "(", "final", "Properties", "properties", ")", "{", "final", "Map", "<", "String", ",", "Properties", ">", "parts", "=", "new", "ConcurrentHashMap", "<>", "(", ")", ...
Partitions a properties map based on common key prefixes up to the first period. @param properties properties to partition @return the partitioned properties where each key is the common prefix (minus the period) and the values are new property maps without the prefix and period in the key @since 2.6
[ "Partitions", "a", "properties", "map", "based", "on", "common", "key", "prefixes", "up", "to", "the", "first", "period", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/PropertiesUtil.java#L320-L330
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/spi/LoggingEventFieldResolver.java
LoggingEventFieldResolver.applyFields
public String applyFields(final String replaceText, final LoggingEvent event) { if (replaceText == null) { return null; } InFixToPostFix.CustomTokenizer tokenizer = new InFixToPostFix.CustomTokenizer(replaceText); StringBuffer result = new StringBuffer(); ...
java
public String applyFields(final String replaceText, final LoggingEvent event) { if (replaceText == null) { return null; } InFixToPostFix.CustomTokenizer tokenizer = new InFixToPostFix.CustomTokenizer(replaceText); StringBuffer result = new StringBuffer(); ...
[ "public", "String", "applyFields", "(", "final", "String", "replaceText", ",", "final", "LoggingEvent", "event", ")", "{", "if", "(", "replaceText", "==", "null", ")", "{", "return", "null", ";", "}", "InFixToPostFix", ".", "CustomTokenizer", "tokenizer", "=",...
Apply fields. @param replaceText replacement text. @param event logging event. @return evaluted expression
[ "Apply", "fields", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/spi/LoggingEventFieldResolver.java#L156-L178
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/spi/LoggingEventFieldResolver.java
LoggingEventFieldResolver.isField
public boolean isField(final String fieldName) { if (fieldName != null) { return (KEYWORD_LIST.contains( fieldName.toUpperCase(Locale.US)) || fieldName.toUpperCase().startsWith(PROP_FIELD)); } return false; }
java
public boolean isField(final String fieldName) { if (fieldName != null) { return (KEYWORD_LIST.contains( fieldName.toUpperCase(Locale.US)) || fieldName.toUpperCase().startsWith(PROP_FIELD)); } return false; }
[ "public", "boolean", "isField", "(", "final", "String", "fieldName", ")", "{", "if", "(", "fieldName", "!=", "null", ")", "{", "return", "(", "KEYWORD_LIST", ".", "contains", "(", "fieldName", ".", "toUpperCase", "(", "Locale", ".", "US", ")", ")", "||",...
Determines if specified string is a recognized field. @param fieldName field name @return true if recognized field.
[ "Determines", "if", "specified", "string", "is", "a", "recognized", "field", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/spi/LoggingEventFieldResolver.java#L193-L200
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/spi/LoggingEventFieldResolver.java
LoggingEventFieldResolver.getValue
public Object getValue(final String fieldName, final LoggingEvent event) { String upperField = fieldName.toUpperCase(Locale.US); if (LOGGER_FIELD.equals(upperField)) { return event.getLoggerName(); } else if (LEVEL_FIELD.equals(upperField)) { return event.getLevel(); ...
java
public Object getValue(final String fieldName, final LoggingEvent event) { String upperField = fieldName.toUpperCase(Locale.US); if (LOGGER_FIELD.equals(upperField)) { return event.getLoggerName(); } else if (LEVEL_FIELD.equals(upperField)) { return event.getLevel(); ...
[ "public", "Object", "getValue", "(", "final", "String", "fieldName", ",", "final", "LoggingEvent", "event", ")", "{", "String", "upperField", "=", "fieldName", ".", "toUpperCase", "(", "Locale", ".", "US", ")", ";", "if", "(", "LOGGER_FIELD", ".", "equals", ...
Get value of field. @param fieldName field @param event event @return value of field
[ "Get", "value", "of", "field", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/spi/LoggingEventFieldResolver.java#L208-L261
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/spi/LoggingEventFieldResolver.java
LoggingEventFieldResolver.getExceptionMessage
private static String getExceptionMessage(final String[] exception) { StringBuffer buff = new StringBuffer(); for (int i = 0; i < exception.length; i++) { buff.append(exception[i]); } return buff.toString(); }
java
private static String getExceptionMessage(final String[] exception) { StringBuffer buff = new StringBuffer(); for (int i = 0; i < exception.length; i++) { buff.append(exception[i]); } return buff.toString(); }
[ "private", "static", "String", "getExceptionMessage", "(", "final", "String", "[", "]", "exception", ")", "{", "StringBuffer", "buff", "=", "new", "StringBuffer", "(", ")", ";", "for", "(", "int", "i", "=", "0", ";", "i", "<", "exception", ".", "length",...
Get message from throwable representation. @param exception exception @return message
[ "Get", "message", "from", "throwable", "representation", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/spi/LoggingEventFieldResolver.java#L268-L274
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java
Slf4jLogger.trace
public void trace( String format, Object arg ) { if( m_delegate.isTraceEnabled() ) { FormattingTuple tuple = MessageFormatter.format( format, arg ); m_delegate.trace( tuple.getMessage(), tuple.getThrowable() ); } }
java
public void trace( String format, Object arg ) { if( m_delegate.isTraceEnabled() ) { FormattingTuple tuple = MessageFormatter.format( format, arg ); m_delegate.trace( tuple.getMessage(), tuple.getThrowable() ); } }
[ "public", "void", "trace", "(", "String", "format", ",", "Object", "arg", ")", "{", "if", "(", "m_delegate", ".", "isTraceEnabled", "(", ")", ")", "{", "FormattingTuple", "tuple", "=", "MessageFormatter", ".", "format", "(", "format", ",", "arg", ")", ";...
Log a message at the TRACE level according to the specified format and argument. <p>This form avoids superfluous object creation when the logger is disabled for the TRACE level. </p> @param format the format string @param arg the argument
[ "Log", "a", "message", "at", "the", "TRACE", "level", "according", "to", "the", "specified", "format", "and", "argument", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L86-L93
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java
Slf4jLogger.trace
public void trace( Marker marker, String msg ) { if( m_delegate.isTraceEnabled() ) { setMDCMarker( marker ); m_delegate.trace( msg, null ); resetMDCMarker(); } }
java
public void trace( Marker marker, String msg ) { if( m_delegate.isTraceEnabled() ) { setMDCMarker( marker ); m_delegate.trace( msg, null ); resetMDCMarker(); } }
[ "public", "void", "trace", "(", "Marker", "marker", ",", "String", "msg", ")", "{", "if", "(", "m_delegate", ".", "isTraceEnabled", "(", ")", ")", "{", "setMDCMarker", "(", "marker", ")", ";", "m_delegate", ".", "trace", "(", "msg", ",", "null", ")", ...
Log a message with the specific Marker at the TRACE level. @param marker the marker data specific to this log statement @param msg the message string to be logged
[ "Log", "a", "message", "with", "the", "specific", "Marker", "at", "the", "TRACE", "level", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L166-L174
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java
Slf4jLogger.debug
public void debug( String format, Object arg ) { if( m_delegate.isDebugEnabled() ) { FormattingTuple tuple = MessageFormatter.format( format, arg ); m_delegate.debug( tuple.getMessage(), tuple.getThrowable() ); } }
java
public void debug( String format, Object arg ) { if( m_delegate.isDebugEnabled() ) { FormattingTuple tuple = MessageFormatter.format( format, arg ); m_delegate.debug( tuple.getMessage(), tuple.getThrowable() ); } }
[ "public", "void", "debug", "(", "String", "format", ",", "Object", "arg", ")", "{", "if", "(", "m_delegate", ".", "isDebugEnabled", "(", ")", ")", "{", "FormattingTuple", "tuple", "=", "MessageFormatter", ".", "format", "(", "format", ",", "arg", ")", ";...
Log a message at the DEBUG level according to the specified format and argument. <p>This form avoids superfluous object creation when the logger is disabled for the DEBUG level. </p> @param format the format string @param arg the argument
[ "Log", "a", "message", "at", "the", "DEBUG", "level", "according", "to", "the", "specified", "format", "and", "argument", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L288-L295
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java
Slf4jLogger.debug
public void debug( Marker marker, String msg ) { if( m_delegate.isDebugEnabled() ) { setMDCMarker( marker ); m_delegate.debug( msg, null ); resetMDCMarker(); } }
java
public void debug( Marker marker, String msg ) { if( m_delegate.isDebugEnabled() ) { setMDCMarker( marker ); m_delegate.debug( msg, null ); resetMDCMarker(); } }
[ "public", "void", "debug", "(", "Marker", "marker", ",", "String", "msg", ")", "{", "if", "(", "m_delegate", ".", "isDebugEnabled", "(", ")", ")", "{", "setMDCMarker", "(", "marker", ")", ";", "m_delegate", ".", "debug", "(", "msg", ",", "null", ")", ...
Log a message with the specific Marker at the DEBUG level. @param marker the marker data specific to this log statement @param msg the message string to be logged
[ "Log", "a", "message", "with", "the", "specific", "Marker", "at", "the", "DEBUG", "level", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L368-L376
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java
Slf4jLogger.info
public void info( String format, Object arg1, Object arg2 ) { if( m_delegate.isInfoEnabled() ) { FormattingTuple tuple = MessageFormatter.format( format, arg1, arg2 ); m_delegate.inform( tuple.getMessage(), tuple.getThrowable() ); } }
java
public void info( String format, Object arg1, Object arg2 ) { if( m_delegate.isInfoEnabled() ) { FormattingTuple tuple = MessageFormatter.format( format, arg1, arg2 ); m_delegate.inform( tuple.getMessage(), tuple.getThrowable() ); } }
[ "public", "void", "info", "(", "String", "format", ",", "Object", "arg1", ",", "Object", "arg2", ")", "{", "if", "(", "m_delegate", ".", "isInfoEnabled", "(", ")", ")", "{", "FormattingTuple", "tuple", "=", "MessageFormatter", ".", "format", "(", "format",...
Log a message at the INFO level according to the specified format and arguments. <p>This form avoids superfluous object creation when the logger is disabled for the INFO level. </p> @param format the format string @param arg1 the first argument @param arg2 the second argument
[ "Log", "a", "message", "at", "the", "INFO", "level", "according", "to", "the", "specified", "format", "and", "arguments", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L510-L517
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java
Slf4jLogger.info
public void info( Marker marker, String msg ) { if( m_delegate.isInfoEnabled() ) { setMDCMarker( marker ); m_delegate.inform( msg, null ); resetMDCMarker(); } }
java
public void info( Marker marker, String msg ) { if( m_delegate.isInfoEnabled() ) { setMDCMarker( marker ); m_delegate.inform( msg, null ); resetMDCMarker(); } }
[ "public", "void", "info", "(", "Marker", "marker", ",", "String", "msg", ")", "{", "if", "(", "m_delegate", ".", "isInfoEnabled", "(", ")", ")", "{", "setMDCMarker", "(", "marker", ")", ";", "m_delegate", ".", "inform", "(", "msg", ",", "null", ")", ...
Log a message with the specific Marker at the INFO level. @param marker The marker specific to this log statement @param msg the message string to be logged
[ "Log", "a", "message", "with", "the", "specific", "Marker", "at", "the", "INFO", "level", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L570-L578
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java
Slf4jLogger.warn
public void warn( Marker marker, String msg ) { if( m_delegate.isWarnEnabled() ) { setMDCMarker( marker ); m_delegate.warn( msg, null ); resetMDCMarker(); } }
java
public void warn( Marker marker, String msg ) { if( m_delegate.isWarnEnabled() ) { setMDCMarker( marker ); m_delegate.warn( msg, null ); resetMDCMarker(); } }
[ "public", "void", "warn", "(", "Marker", "marker", ",", "String", "msg", ")", "{", "if", "(", "m_delegate", ".", "isWarnEnabled", "(", ")", ")", "{", "setMDCMarker", "(", "marker", ")", ";", "m_delegate", ".", "warn", "(", "msg", ",", "null", ")", ";...
Log a message with the specific Marker at the WARN level. @param marker The marker specific to this log statement @param msg the message string to be logged
[ "Log", "a", "message", "with", "the", "specific", "Marker", "at", "the", "WARN", "level", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L772-L780
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java
Slf4jLogger.error
public void error( String format, Object arg ) { if( m_delegate.isErrorEnabled() ) { FormattingTuple tuple = MessageFormatter.format( format, arg ); m_delegate.error( tuple.getMessage(), tuple.getThrowable() ); } }
java
public void error( String format, Object arg ) { if( m_delegate.isErrorEnabled() ) { FormattingTuple tuple = MessageFormatter.format( format, arg ); m_delegate.error( tuple.getMessage(), tuple.getThrowable() ); } }
[ "public", "void", "error", "(", "String", "format", ",", "Object", "arg", ")", "{", "if", "(", "m_delegate", ".", "isErrorEnabled", "(", ")", ")", "{", "FormattingTuple", "tuple", "=", "MessageFormatter", ".", "format", "(", "format", ",", "arg", ")", ";...
Log a message at the ERROR level according to the specified format and argument. <p>This form avoids superfluous object creation when the logger is disabled for the ERROR level. </p> @param format the format string @param arg the argument
[ "Log", "a", "message", "at", "the", "ERROR", "level", "according", "to", "the", "specified", "format", "and", "argument", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L894-L901
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java
Slf4jLogger.error
public void error( Marker marker, String msg ) { if( m_delegate.isErrorEnabled() ) { setMDCMarker( marker ); m_delegate.error( msg, null ); resetMDCMarker(); } }
java
public void error( Marker marker, String msg ) { if( m_delegate.isErrorEnabled() ) { setMDCMarker( marker ); m_delegate.error( msg, null ); resetMDCMarker(); } }
[ "public", "void", "error", "(", "Marker", "marker", ",", "String", "msg", ")", "{", "if", "(", "m_delegate", ".", "isErrorEnabled", "(", ")", ")", "{", "setMDCMarker", "(", "marker", ")", ";", "m_delegate", ".", "error", "(", "msg", ",", "null", ")", ...
Log a message with the specific Marker at the ERROR level. @param marker The marker specific to this log statement @param msg the message string to be logged
[ "Log", "a", "message", "with", "the", "specific", "Marker", "at", "the", "ERROR", "level", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L974-L982
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java
Slf4jLogger.log
public void log(Marker marker, String fqcn, int level, String message, Object[] argArray, Throwable t) { setMDCMarker( marker ); switch(level) { case(TRACE_INT): if( m_delegate.isTraceEnabled() ) { FormattingTuple tuple = MessageFormat...
java
public void log(Marker marker, String fqcn, int level, String message, Object[] argArray, Throwable t) { setMDCMarker( marker ); switch(level) { case(TRACE_INT): if( m_delegate.isTraceEnabled() ) { FormattingTuple tuple = MessageFormat...
[ "public", "void", "log", "(", "Marker", "marker", ",", "String", "fqcn", ",", "int", "level", ",", "String", "message", ",", "Object", "[", "]", "argArray", ",", "Throwable", "t", ")", "{", "setMDCMarker", "(", "marker", ")", ";", "switch", "(", "level...
This method implements LocationAwareLogger.log The caller passes in it's own Fully Qualified Class Name (fqcn). @param marker @param fqcn the fully qualified class name (FQCN) of the <b>caller</b> @param level Integer representation of the log level as defined in LocationAwareLogger @param message the message as a fo...
[ "This", "method", "implements", "LocationAwareLogger", ".", "log" ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/ops4j/pax/logging/slf4j/Slf4jLogger.java#L1075-L1119
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/rule/NotRule.java
NotRule.getRule
public static Rule getRule(final Stack stack) { if (stack.size() < 1) { throw new IllegalArgumentException( "Invalid NOT rule - expected one rule but received " + stack.size()); } Object o1 = stack.pop(); if (o1 instanceof Rule) { Rul...
java
public static Rule getRule(final Stack stack) { if (stack.size() < 1) { throw new IllegalArgumentException( "Invalid NOT rule - expected one rule but received " + stack.size()); } Object o1 = stack.pop(); if (o1 instanceof Rule) { Rul...
[ "public", "static", "Rule", "getRule", "(", "final", "Stack", "stack", ")", "{", "if", "(", "stack", ".", "size", "(", ")", "<", "1", ")", "{", "throw", "new", "IllegalArgumentException", "(", "\"Invalid NOT rule - expected one rule but received \"", "+", "stack...
Create new instance from top element of stack. @param stack stack @return new rule.
[ "Create", "new", "instance", "from", "top", "element", "of", "stack", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/rule/NotRule.java#L67-L80
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/log4j/Category.java
Category.fatal
public void fatal( final Object message ) { if( m_delegate.isFatalEnabled() && message != null ) { m_delegate.fatal( message.toString(), null ); } }
java
public void fatal( final Object message ) { if( m_delegate.isFatalEnabled() && message != null ) { m_delegate.fatal( message.toString(), null ); } }
[ "public", "void", "fatal", "(", "final", "Object", "message", ")", "{", "if", "(", "m_delegate", ".", "isFatalEnabled", "(", ")", "&&", "message", "!=", "null", ")", "{", "m_delegate", ".", "fatal", "(", "message", ".", "toString", "(", ")", ",", "null...
Log a message object with the FATAL Level. <p> This method first checks if this category is <code>FATAL</code> enabled by comparing the level of this category with FATAL Level. If the category is <code>FATAL</code> enabled, then it converts the message object passed as parameter to a string by invoking the appropriate...
[ "Log", "a", "message", "object", "with", "the", "FATAL", "Level", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/log4j/Category.java#L287-L293
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
LocalizedMessage.getFormattedMessage
@Override public String getFormattedMessage() { if (formattedMessage != null) { return formattedMessage; } ResourceBundle bundle = this.resourceBundle; if (bundle == null) { if (baseName != null) { bundle = getResourceBundle(baseName, locale, f...
java
@Override public String getFormattedMessage() { if (formattedMessage != null) { return formattedMessage; } ResourceBundle bundle = this.resourceBundle; if (bundle == null) { if (baseName != null) { bundle = getResourceBundle(baseName, locale, f...
[ "@", "Override", "public", "String", "getFormattedMessage", "(", ")", "{", "if", "(", "formattedMessage", "!=", "null", ")", "{", "return", "formattedMessage", ";", "}", "ResourceBundle", "bundle", "=", "this", ".", "resourceBundle", ";", "if", "(", "bundle", ...
Returns the formatted message after looking up the format in the resource bundle. @return The formatted message String.
[ "Returns", "the", "formatted", "message", "after", "looking", "up", "the", "format", "in", "the", "resource", "bundle", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java#L179-L199
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
LocalizedMessage.getResourceBundle
protected ResourceBundle getResourceBundle(final String rbBaseName, final Locale resourceBundleLocale, final boolean loop) { ResourceBundle rb = null; if (rbBaseName == null) { return null; } try { if (resourceBundleLocale != null) { r...
java
protected ResourceBundle getResourceBundle(final String rbBaseName, final Locale resourceBundleLocale, final boolean loop) { ResourceBundle rb = null; if (rbBaseName == null) { return null; } try { if (resourceBundleLocale != null) { r...
[ "protected", "ResourceBundle", "getResourceBundle", "(", "final", "String", "rbBaseName", ",", "final", "Locale", "resourceBundleLocale", ",", "final", "boolean", "loop", ")", "{", "ResourceBundle", "rb", "=", "null", ";", "if", "(", "rbBaseName", "==", "null", ...
Override this to use a ResourceBundle.Control in Java 6 @param rbBaseName The base name of the resource bundle, a fully qualified class name. @param resourceBundleLocale The locale to use when formatting the message. @param loop If true the key will be treated as a package or class name and a resource bundle will be l...
[ "Override", "this", "to", "use", "a", "ResourceBundle", ".", "Control", "in", "Java", "6" ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java#L228-L263
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java
MarkerManager.getMarker
public static Marker getMarker(final String name) { Marker result = MARKERS.get(name); if (result == null) { MARKERS.putIfAbsent(name, new Log4jMarker(name)); result = MARKERS.get(name); } return result; }
java
public static Marker getMarker(final String name) { Marker result = MARKERS.get(name); if (result == null) { MARKERS.putIfAbsent(name, new Log4jMarker(name)); result = MARKERS.get(name); } return result; }
[ "public", "static", "Marker", "getMarker", "(", "final", "String", "name", ")", "{", "Marker", "result", "=", "MARKERS", ".", "get", "(", "name", ")", ";", "if", "(", "result", "==", "null", ")", "{", "MARKERS", ".", "putIfAbsent", "(", "name", ",", ...
Retrieves a Marker or create a Marker that has no parent. @param name The name of the Marker. @return The Marker with the specified name. @throws IllegalArgumentException if the argument is {@code null}
[ "Retrieves", "a", "Marker", "or", "create", "a", "Marker", "that", "has", "no", "parent", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java#L62-L69
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java
MarkerManager.getMarker
@Deprecated public static Marker getMarker(final String name, final String parent) { final Marker parentMarker = MARKERS.get(parent); if (parentMarker == null) { throw new IllegalArgumentException("Parent Marker " + parent + " has not been defined"); } return getMarker(na...
java
@Deprecated public static Marker getMarker(final String name, final String parent) { final Marker parentMarker = MARKERS.get(parent); if (parentMarker == null) { throw new IllegalArgumentException("Parent Marker " + parent + " has not been defined"); } return getMarker(na...
[ "@", "Deprecated", "public", "static", "Marker", "getMarker", "(", "final", "String", "name", ",", "final", "String", "parent", ")", "{", "final", "Marker", "parentMarker", "=", "MARKERS", ".", "get", "(", "parent", ")", ";", "if", "(", "parentMarker", "==...
Retrieves or creates a Marker with the specified parent. The parent must have been previously created. @param name The name of the Marker. @param parent The name of the parent Marker. @return The Marker with the specified name. @throws IllegalArgumentException if the parent Marker does not exist. @deprecated Use the M...
[ "Retrieves", "or", "creates", "a", "Marker", "with", "the", "specified", "parent", ".", "The", "parent", "must", "have", "been", "previously", "created", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java#L80-L87
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java
MarkerManager.getMarker
@Deprecated public static Marker getMarker(final String name, final Marker parent) { return getMarker(name).addParents(parent); }
java
@Deprecated public static Marker getMarker(final String name, final Marker parent) { return getMarker(name).addParents(parent); }
[ "@", "Deprecated", "public", "static", "Marker", "getMarker", "(", "final", "String", "name", ",", "final", "Marker", "parent", ")", "{", "return", "getMarker", "(", "name", ")", ".", "addParents", "(", "parent", ")", ";", "}" ]
Retrieves or creates a Marker with the specified parent. @param name The name of the Marker. @param parent The parent Marker. @return The Marker with the specified name. @throws IllegalArgumentException if any argument is {@code null} @deprecated Use the Marker add or set methods to add parent Markers. Will be removed...
[ "Retrieves", "or", "creates", "a", "Marker", "with", "the", "specified", "parent", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/MarkerManager.java#L98-L101
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
StackLocator.getCallerClass
@PerformanceSensitive public Class<?> getCallerClass(final int depth) { if (depth < 0) { throw new IndexOutOfBoundsException(Integer.toString(depth)); } // note that we need to add 1 to the depth value to compensate for this method, but not for the Method.invoke // since ...
java
@PerformanceSensitive public Class<?> getCallerClass(final int depth) { if (depth < 0) { throw new IndexOutOfBoundsException(Integer.toString(depth)); } // note that we need to add 1 to the depth value to compensate for this method, but not for the Method.invoke // since ...
[ "@", "PerformanceSensitive", "public", "Class", "<", "?", ">", "getCallerClass", "(", "final", "int", "depth", ")", "{", "if", "(", "depth", "<", "0", ")", "{", "throw", "new", "IndexOutOfBoundsException", "(", "Integer", ".", "toString", "(", "depth", ")"...
migrated from ReflectiveCallerClassUtility
[ "migrated", "from", "ReflectiveCallerClassUtility" ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java#L104-L118
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
StackLocator.getCallerClass
@PerformanceSensitive public Class<?> getCallerClass(final Class<?> anchor) { boolean next = false; Class<?> clazz; for (int i = 2; null != (clazz = getCallerClass(i)); i++) { if (anchor.equals(clazz)) { next = true; continue; } ...
java
@PerformanceSensitive public Class<?> getCallerClass(final Class<?> anchor) { boolean next = false; Class<?> clazz; for (int i = 2; null != (clazz = getCallerClass(i)); i++) { if (anchor.equals(clazz)) { next = true; continue; } ...
[ "@", "PerformanceSensitive", "public", "Class", "<", "?", ">", "getCallerClass", "(", "final", "Class", "<", "?", ">", "anchor", ")", "{", "boolean", "next", "=", "false", ";", "Class", "<", "?", ">", "clazz", ";", "for", "(", "int", "i", "=", "2", ...
added for use in LoggerAdapter implementations mainly
[ "added", "for", "use", "in", "LoggerAdapter", "implementations", "mainly" ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java#L139-L153
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java
StackLocator.getCurrentStackTrace
@PerformanceSensitive public Stack<Class<?>> getCurrentStackTrace() { // benchmarks show that using the SecurityManager is much faster than looping through getCallerClass(int) if (getSecurityManager() != null) { final Class<?>[] array = getSecurityManager().getClassContext(); ...
java
@PerformanceSensitive public Stack<Class<?>> getCurrentStackTrace() { // benchmarks show that using the SecurityManager is much faster than looping through getCallerClass(int) if (getSecurityManager() != null) { final Class<?>[] array = getSecurityManager().getClassContext(); ...
[ "@", "PerformanceSensitive", "public", "Stack", "<", "Class", "<", "?", ">", ">", "getCurrentStackTrace", "(", ")", "{", "// benchmarks show that using the SecurityManager is much faster than looping through getCallerClass(int)", "if", "(", "getSecurityManager", "(", ")", "!=...
migrated from ThrowableProxy
[ "migrated", "from", "ThrowableProxy" ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/StackLocator.java#L156-L175
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java
FormattedMessage.getFormattedMessage
@Override public String getFormattedMessage() { if (formattedMessage == null) { if (message == null) { message = getMessage(messagePattern, argArray, throwable); } formattedMessage = message.getFormattedMessage(); } return formattedMessage;...
java
@Override public String getFormattedMessage() { if (formattedMessage == null) { if (message == null) { message = getMessage(messagePattern, argArray, throwable); } formattedMessage = message.getFormattedMessage(); } return formattedMessage;...
[ "@", "Override", "public", "String", "getFormattedMessage", "(", ")", "{", "if", "(", "formattedMessage", "==", "null", ")", "{", "if", "(", "message", "==", "null", ")", "{", "message", "=", "getMessage", "(", "messagePattern", ",", "argArray", ",", "thro...
Gets the formatted message. @return the formatted message.
[ "Gets", "the", "formatted", "message", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/message/FormattedMessage.java#L172-L181
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/receivers/xml/LogFileXMLReceiver.java
LogFileXMLReceiver.shutdown
public void shutdown() { try { if (reader != null) { reader.close(); reader = null; } } catch (IOException ioe) { ioe.printStackTrace(); } }
java
public void shutdown() { try { if (reader != null) { reader.close(); reader = null; } } catch (IOException ioe) { ioe.printStackTrace(); } }
[ "public", "void", "shutdown", "(", ")", "{", "try", "{", "if", "(", "reader", "!=", "null", ")", "{", "reader", ".", "close", "(", ")", ";", "reader", "=", "null", ";", "}", "}", "catch", "(", "IOException", "ioe", ")", "{", "ioe", ".", "printSta...
Close the receiver, release any resources that are accessing the file.
[ "Close", "the", "receiver", "release", "any", "resources", "that", "are", "accessing", "the", "file", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/receivers/xml/LogFileXMLReceiver.java#L167-L176
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/receivers/xml/LogFileXMLReceiver.java
LogFileXMLReceiver.activateOptions
public void activateOptions() { Runnable runnable = new Runnable() { public void run() { try { URL url = new URL(fileURL); host = url.getHost(); if (host != null && host.equals("")) { host = FI...
java
public void activateOptions() { Runnable runnable = new Runnable() { public void run() { try { URL url = new URL(fileURL); host = url.getHost(); if (host != null && host.equals("")) { host = FI...
[ "public", "void", "activateOptions", "(", ")", "{", "Runnable", "runnable", "=", "new", "Runnable", "(", ")", "{", "public", "void", "run", "(", ")", "{", "try", "{", "URL", "url", "=", "new", "URL", "(", "fileURL", ")", ";", "host", "=", "url", "....
Process the file
[ "Process", "the", "file" ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/receivers/xml/LogFileXMLReceiver.java#L181-L241
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/LoggerRepositoryExImpl.java
LoggerRepositoryExImpl.setName
public void setName(final String repoName) { if (name == null) { name = repoName; } else if (!name.equals(repoName)) { throw new IllegalStateException( "Repository [" + name + "] cannot be renamed as [" + repoName + "]."); } }
java
public void setName(final String repoName) { if (name == null) { name = repoName; } else if (!name.equals(repoName)) { throw new IllegalStateException( "Repository [" + name + "] cannot be renamed as [" + repoName + "]."); } }
[ "public", "void", "setName", "(", "final", "String", "repoName", ")", "{", "if", "(", "name", "==", "null", ")", "{", "name", "=", "repoName", ";", "}", "else", "if", "(", "!", "name", ".", "equals", "(", "repoName", ")", ")", "{", "throw", "new", ...
Set the name of this repository. Note that once named, a repository cannot be rerenamed. @param repoName name of hierarchy
[ "Set", "the", "name", "of", "this", "repository", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/LoggerRepositoryExImpl.java#L253-L260
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/LoggerRepositoryExImpl.java
LoggerRepositoryExImpl.getScheduler
public Scheduler getScheduler() { if (scheduler == null) { scheduler = new Scheduler(); scheduler.setDaemon(true); scheduler.start(); } return scheduler; }
java
public Scheduler getScheduler() { if (scheduler == null) { scheduler = new Scheduler(); scheduler.setDaemon(true); scheduler.start(); } return scheduler; }
[ "public", "Scheduler", "getScheduler", "(", ")", "{", "if", "(", "scheduler", "==", "null", ")", "{", "scheduler", "=", "new", "Scheduler", "(", ")", ";", "scheduler", ".", "setDaemon", "(", "true", ")", ";", "scheduler", ".", "start", "(", ")", ";", ...
Return this repository's own scheduler. The scheduler is lazily instantiated. @return this repository's own scheduler.
[ "Return", "this", "repository", "s", "own", "scheduler", ".", "The", "scheduler", "is", "lazily", "instantiated", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/LoggerRepositoryExImpl.java#L539-L546
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/component/spi/SimpleULogger.java
SimpleULogger.parameterizedLog
private void parameterizedLog(final String level, final Object parameterizedMsg, final Object param1, final Object param2) { if (parameterizedMsg instanceof String) { String msgStr = (String) parameterizedMsg; ...
java
private void parameterizedLog(final String level, final Object parameterizedMsg, final Object param1, final Object param2) { if (parameterizedMsg instanceof String) { String msgStr = (String) parameterizedMsg; ...
[ "private", "void", "parameterizedLog", "(", "final", "String", "level", ",", "final", "Object", "parameterizedMsg", ",", "final", "Object", "param1", ",", "final", "Object", "param2", ")", "{", "if", "(", "parameterizedMsg", "instanceof", "String", ")", "{", "...
For parameterized messages, first substitute parameters and then log. @param level level @param parameterizedMsg message pattern @param param1 param1 @param param2 param2
[ "For", "parameterized", "messages", "first", "substitute", "parameters", "and", "then", "log", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/component/spi/SimpleULogger.java#L177-L190
train
ops4j/org.ops4j.pax.logging
pax-logging-samples/fragment/src/main/java/org/ops4j/pax/logging/extender/ZipRollingFileAppender.java
ZipRollingFileAppender.archiveFile
boolean archiveFile(File logFile) { FileOutputStream fOut; ZipOutputStream zOut; // necessary because of possible IOException try { fOut = new FileOutputStream(logFile.getPath() + ".zip"); zOut = new ZipOutputStream(fOut); FileInputStream fIn = new FileInputStream(logFile); BufferedInputStream bI...
java
boolean archiveFile(File logFile) { FileOutputStream fOut; ZipOutputStream zOut; // necessary because of possible IOException try { fOut = new FileOutputStream(logFile.getPath() + ".zip"); zOut = new ZipOutputStream(fOut); FileInputStream fIn = new FileInputStream(logFile); BufferedInputStream bI...
[ "boolean", "archiveFile", "(", "File", "logFile", ")", "{", "FileOutputStream", "fOut", ";", "ZipOutputStream", "zOut", ";", "// necessary because of possible IOException", "try", "{", "fOut", "=", "new", "FileOutputStream", "(", "logFile", ".", "getPath", "(", ")",...
archive log file
[ "archive", "log", "file" ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-samples/fragment/src/main/java/org/ops4j/pax/logging/extender/ZipRollingFileAppender.java#L86-L124
train
ops4j/org.ops4j.pax.logging
pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java
ResolverUtil.getClassLoader
public ClassLoader getClassLoader() { return classloader != null ? classloader : (classloader = Loader.getClassLoader(ResolverUtil.class, null)); }
java
public ClassLoader getClassLoader() { return classloader != null ? classloader : (classloader = Loader.getClassLoader(ResolverUtil.class, null)); }
[ "public", "ClassLoader", "getClassLoader", "(", ")", "{", "return", "classloader", "!=", "null", "?", "classloader", ":", "(", "classloader", "=", "Loader", ".", "getClassLoader", "(", "ResolverUtil", ".", "class", ",", "null", ")", ")", ";", "}" ]
Returns the classloader that will be used for scanning for classes. If no explicit ClassLoader has been set by the calling, the context class loader will be used. @return the ClassLoader that will be used to scan for classes
[ "Returns", "the", "classloader", "that", "will", "be", "used", "for", "scanning", "for", "classes", ".", "If", "no", "explicit", "ClassLoader", "has", "been", "set", "by", "the", "calling", "the", "context", "class", "loader", "will", "be", "used", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java#L127-L129
train
ops4j/org.ops4j.pax.logging
pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java
ResolverUtil.addIfMatching
protected void addIfMatching(final Test test, final String fqn) { try { final ClassLoader loader = getClassLoader(); if (test.doesMatchClass()) { final String externalName = fqn.substring(0, fqn.indexOf('.')).replace('/', '.'); if (LOGGER.isDebugEnabled())...
java
protected void addIfMatching(final Test test, final String fqn) { try { final ClassLoader loader = getClassLoader(); if (test.doesMatchClass()) { final String externalName = fqn.substring(0, fqn.indexOf('.')).replace('/', '.'); if (LOGGER.isDebugEnabled())...
[ "protected", "void", "addIfMatching", "(", "final", "Test", "test", ",", "final", "String", "fqn", ")", "{", "try", "{", "final", "ClassLoader", "loader", "=", "getClassLoader", "(", ")", ";", "if", "(", "test", ".", "doesMatchClass", "(", ")", ")", "{",...
Add the class designated by the fully qualified class name provided to the set of resolved classes if and only if it is approved by the Test supplied. @param test the test used to determine if the class matches @param fqn the fully qualified name of a class
[ "Add", "the", "class", "designated", "by", "the", "fully", "qualified", "class", "name", "provided", "to", "the", "set", "of", "resolved", "classes", "if", "and", "only", "if", "it", "is", "approved", "by", "the", "Test", "supplied", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-log4j2/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java#L378-L404
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/ConsoleAppender.java
ConsoleAppender.activateOptions
public void activateOptions() { if (follow) { if (target.equals(SYSTEM_ERR)) { setWriter(createWriter(new SystemErrStream())); } else { setWriter(createWriter(new SystemOutStream())); } } else { if (target.equals(SYSTEM_ERR)) ...
java
public void activateOptions() { if (follow) { if (target.equals(SYSTEM_ERR)) { setWriter(createWriter(new SystemErrStream())); } else { setWriter(createWriter(new SystemOutStream())); } } else { if (target.equals(SYSTEM_ERR)) ...
[ "public", "void", "activateOptions", "(", ")", "{", "if", "(", "follow", ")", "{", "if", "(", "target", ".", "equals", "(", "SYSTEM_ERR", ")", ")", "{", "setWriter", "(", "createWriter", "(", "new", "SystemErrStream", "(", ")", ")", ")", ";", "}", "e...
Prepares the appender for use.
[ "Prepares", "the", "appender", "for", "use", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/ConsoleAppender.java#L133-L149
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java
ProviderUtil.loadProvider
protected static void loadProvider(final URL url, final ClassLoader cl) { try { final Properties props = PropertiesUtil.loadClose(url.openStream(), url); if (validVersion(props.getProperty(API_VERSION))) { final Provider provider = new Provider(props, url, cl); ...
java
protected static void loadProvider(final URL url, final ClassLoader cl) { try { final Properties props = PropertiesUtil.loadClose(url.openStream(), url); if (validVersion(props.getProperty(API_VERSION))) { final Provider provider = new Provider(props, url, cl); ...
[ "protected", "static", "void", "loadProvider", "(", "final", "URL", "url", ",", "final", "ClassLoader", "cl", ")", "{", "try", "{", "final", "Properties", "props", "=", "PropertiesUtil", ".", "loadClose", "(", "url", ".", "openStream", "(", ")", ",", "url"...
Loads an individual Provider implementation. This method is really only useful for the OSGi bundle activator and this class itself. @param url the URL to the provider properties file @param cl the ClassLoader to load the provider classes with
[ "Loads", "an", "individual", "Provider", "implementation", ".", "This", "method", "is", "really", "only", "useful", "for", "the", "OSGi", "bundle", "activator", "and", "this", "class", "itself", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java#L84-L95
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java
ProviderUtil.lazyInit
protected static void lazyInit() { // noinspection DoubleCheckedLocking if (instance == null) { try { STARTUP_LOCK.lockInterruptibly(); try { if (instance == null) { instance = new ProviderUtil(); ...
java
protected static void lazyInit() { // noinspection DoubleCheckedLocking if (instance == null) { try { STARTUP_LOCK.lockInterruptibly(); try { if (instance == null) { instance = new ProviderUtil(); ...
[ "protected", "static", "void", "lazyInit", "(", ")", "{", "// noinspection DoubleCheckedLocking", "if", "(", "instance", "==", "null", ")", "{", "try", "{", "STARTUP_LOCK", ".", "lockInterruptibly", "(", ")", ";", "try", "{", "if", "(", "instance", "==", "nu...
Lazily initializes the ProviderUtil singleton. @since 2.1
[ "Lazily", "initializes", "the", "ProviderUtil", "singleton", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/ProviderUtil.java#L133-L150
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/LambdaUtil.java
LambdaUtil.getAll
public static Object[] getAll(final Supplier<?>... suppliers) { if (suppliers == null) { return null; } final Object[] result = new Object[suppliers.length]; for (int i = 0; i < result.length; i++) { result[i] = get(suppliers[i]); } return result; ...
java
public static Object[] getAll(final Supplier<?>... suppliers) { if (suppliers == null) { return null; } final Object[] result = new Object[suppliers.length]; for (int i = 0; i < result.length; i++) { result[i] = get(suppliers[i]); } return result; ...
[ "public", "static", "Object", "[", "]", "getAll", "(", "final", "Supplier", "<", "?", ">", "...", "suppliers", ")", "{", "if", "(", "suppliers", "==", "null", ")", "{", "return", "null", ";", "}", "final", "Object", "[", "]", "result", "=", "new", ...
Converts an array of lambda expressions into an array of their evaluation results. @param suppliers an array of lambda expressions or {@code null} @return an array containing the results of evaluating the lambda expressions (or {@code null} if the suppliers array was {@code null}
[ "Converts", "an", "array", "of", "lambda", "expressions", "into", "an", "array", "of", "their", "evaluation", "results", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/LambdaUtil.java#L41-L50
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/util/LambdaUtil.java
LambdaUtil.getMessage
public static Message getMessage(final Supplier<?> supplier, final MessageFactory messageFactory) { if (supplier == null) { return null; } final Object result = supplier.get(); return result instanceof Message ? (Message) result : messageFactory.newMessage(result); }
java
public static Message getMessage(final Supplier<?> supplier, final MessageFactory messageFactory) { if (supplier == null) { return null; } final Object result = supplier.get(); return result instanceof Message ? (Message) result : messageFactory.newMessage(result); }
[ "public", "static", "Message", "getMessage", "(", "final", "Supplier", "<", "?", ">", "supplier", ",", "final", "MessageFactory", "messageFactory", ")", "{", "if", "(", "supplier", "==", "null", ")", "{", "return", "null", ";", "}", "final", "Object", "res...
Returns a Message, either the value supplied by the specified function, or a new Message created by the specified Factory. @param supplier a lambda expression or {@code null} @return the Message resulting from evaluating the lambda expression or the Message created by the factory for supplied values that are not of typ...
[ "Returns", "a", "Message", "either", "the", "value", "supplied", "by", "the", "specified", "function", "or", "a", "new", "Message", "created", "by", "the", "specified", "Factory", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/util/LambdaUtil.java#L87-L93
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.findAppenderByName
protected Appender findAppenderByName(Document doc, String appenderName) { Appender appender = (Appender) appenderBag.get(appenderName); if(appender != null) { return appender; } else { // Doesn't work on DOM Level 1 : // Element element = doc.getElementById(appenderName); ...
java
protected Appender findAppenderByName(Document doc, String appenderName) { Appender appender = (Appender) appenderBag.get(appenderName); if(appender != null) { return appender; } else { // Doesn't work on DOM Level 1 : // Element element = doc.getElementById(appenderName); ...
[ "protected", "Appender", "findAppenderByName", "(", "Document", "doc", ",", "String", "appenderName", ")", "{", "Appender", "appender", "=", "(", "Appender", ")", "appenderBag", ".", "get", "(", "appenderName", ")", ";", "if", "(", "appender", "!=", "null", ...
Used internally to parse appenders by IDREF name.
[ "Used", "internally", "to", "parse", "appenders", "by", "IDREF", "name", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L125-L160
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.findAppenderByReference
protected Appender findAppenderByReference(Element appenderRef) { String appenderName = subst(appenderRef.getAttribute(REF_ATTR)); Document doc = appenderRef.getOwnerDocument(); return findAppenderByName(doc, appenderName); }
java
protected Appender findAppenderByReference(Element appenderRef) { String appenderName = subst(appenderRef.getAttribute(REF_ATTR)); Document doc = appenderRef.getOwnerDocument(); return findAppenderByName(doc, appenderName); }
[ "protected", "Appender", "findAppenderByReference", "(", "Element", "appenderRef", ")", "{", "String", "appenderName", "=", "subst", "(", "appenderRef", ".", "getAttribute", "(", "REF_ATTR", ")", ")", ";", "Document", "doc", "=", "appenderRef", ".", "getOwnerDocum...
Used internally to parse appenders by IDREF element.
[ "Used", "internally", "to", "parse", "appenders", "by", "IDREF", "element", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L164-L169
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.parseUnrecognizedElement
private static void parseUnrecognizedElement(final Object instance, final Element element, final Properties props) throws Exception { boolean recognized = false; if (instance instanceof UnrecognizedElementHandler) { re...
java
private static void parseUnrecognizedElement(final Object instance, final Element element, final Properties props) throws Exception { boolean recognized = false; if (instance instanceof UnrecognizedElementHandler) { re...
[ "private", "static", "void", "parseUnrecognizedElement", "(", "final", "Object", "instance", ",", "final", "Element", "element", ",", "final", "Properties", "props", ")", "throws", "Exception", "{", "boolean", "recognized", "=", "false", ";", "if", "(", "instanc...
Delegates unrecognized content to created instance if it supports UnrecognizedElementParser. @since 1.2.15 @param instance instance, may be null. @param element element, may not be null. @param props properties @throws IOException thrown if configuration of owner object should be abandoned.
[ "Delegates", "unrecognized", "content", "to", "created", "instance", "if", "it", "supports", "UnrecognizedElementParser", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L181-L192
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.quietParseUnrecognizedElement
private static void quietParseUnrecognizedElement(final Object instance, final Element element, final Properties props) { try { parseUnrecognizedElement(instance, element, props); } catch (Exception ex) { ...
java
private static void quietParseUnrecognizedElement(final Object instance, final Element element, final Properties props) { try { parseUnrecognizedElement(instance, element, props); } catch (Exception ex) { ...
[ "private", "static", "void", "quietParseUnrecognizedElement", "(", "final", "Object", "instance", ",", "final", "Element", "element", ",", "final", "Properties", "props", ")", "{", "try", "{", "parseUnrecognizedElement", "(", "instance", ",", "element", ",", "prop...
Delegates unrecognized content to created instance if it supports UnrecognizedElementParser and catches and logs any exception. @since 1.2.15 @param instance instance, may be null. @param element element, may not be null. @param props properties
[ "Delegates", "unrecognized", "content", "to", "created", "instance", "if", "it", "supports", "UnrecognizedElementParser", "and", "catches", "and", "logs", "any", "exception", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L203-L211
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.parseAppender
protected Appender parseAppender (Element appenderElement) { String className = subst(appenderElement.getAttribute(CLASS_ATTR)); LogLog.debug("Class name: [" + className+']'); try { Object instance = Loader.loadClass(className).newInstance(); Appender appender = (Appender)instance; ...
java
protected Appender parseAppender (Element appenderElement) { String className = subst(appenderElement.getAttribute(CLASS_ATTR)); LogLog.debug("Class name: [" + className+']'); try { Object instance = Loader.loadClass(className).newInstance(); Appender appender = (Appender)instance; ...
[ "protected", "Appender", "parseAppender", "(", "Element", "appenderElement", ")", "{", "String", "className", "=", "subst", "(", "appenderElement", ".", "getAttribute", "(", "CLASS_ATTR", ")", ")", ";", "LogLog", ".", "debug", "(", "\"Class name: [\"", "+", "cla...
Used internally to parse an appender element.
[ "Used", "internally", "to", "parse", "an", "appender", "element", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L216-L279
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.parseFilters
protected void parseFilters(Element element, Appender appender) { String clazz = subst(element.getAttribute(CLASS_ATTR)); Filter filter = (Filter) OptionConverter.instantiateByClassName(clazz, Filter.class, null); if(filter != null) { PropertySett...
java
protected void parseFilters(Element element, Appender appender) { String clazz = subst(element.getAttribute(CLASS_ATTR)); Filter filter = (Filter) OptionConverter.instantiateByClassName(clazz, Filter.class, null); if(filter != null) { PropertySett...
[ "protected", "void", "parseFilters", "(", "Element", "element", ",", "Appender", "appender", ")", "{", "String", "clazz", "=", "subst", "(", "element", ".", "getAttribute", "(", "CLASS_ATTR", ")", ")", ";", "Filter", "filter", "=", "(", "Filter", ")", "Opt...
Used internally to parse a filter element.
[ "Used", "internally", "to", "parse", "a", "filter", "element", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L328-L356
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.parseCategory
protected void parseCategory (Element loggerElement) { // Create a new org.apache.log4j.Category object from the <category> element. String catName = subst(loggerElement.getAttribute(NAME_ATTR)); Logger cat; String className = subst(loggerElement.getAttribute(CLASS_ATTR)); if(EMPTY_STR.equ...
java
protected void parseCategory (Element loggerElement) { // Create a new org.apache.log4j.Category object from the <category> element. String catName = subst(loggerElement.getAttribute(NAME_ATTR)); Logger cat; String className = subst(loggerElement.getAttribute(CLASS_ATTR)); if(EMPTY_STR.equ...
[ "protected", "void", "parseCategory", "(", "Element", "loggerElement", ")", "{", "// Create a new org.apache.log4j.Category object from the <category> element.", "String", "catName", "=", "subst", "(", "loggerElement", ".", "getAttribute", "(", "NAME_ATTR", ")", ")", ";", ...
Used internally to parse an category element.
[ "Used", "internally", "to", "parse", "an", "category", "element", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L361-L401
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.parseCategoryFactory
protected void parseCategoryFactory(Element factoryElement) { String className = subst(factoryElement.getAttribute(CLASS_ATTR)); if(EMPTY_STR.equals(className)) { LogLog.error("Category Factory tag " + CLASS_ATTR + " attribute not found."); LogLog.debug("No Category Factory configured."); } ...
java
protected void parseCategoryFactory(Element factoryElement) { String className = subst(factoryElement.getAttribute(CLASS_ATTR)); if(EMPTY_STR.equals(className)) { LogLog.error("Category Factory tag " + CLASS_ATTR + " attribute not found."); LogLog.debug("No Category Factory configured."); } ...
[ "protected", "void", "parseCategoryFactory", "(", "Element", "factoryElement", ")", "{", "String", "className", "=", "subst", "(", "factoryElement", ".", "getAttribute", "(", "CLASS_ATTR", ")", ")", ";", "if", "(", "EMPTY_STR", ".", "equals", "(", "className", ...
Used internally to parse the category factory element.
[ "Used", "internally", "to", "parse", "the", "category", "factory", "element", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L407-L444
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.parseRoot
protected void parseRoot (Element rootElement) { Logger root = repository.getRootLogger(); // category configuration needs to be atomic synchronized(root) { parseChildrenOfLoggerElement(rootElement, root, true); } }
java
protected void parseRoot (Element rootElement) { Logger root = repository.getRootLogger(); // category configuration needs to be atomic synchronized(root) { parseChildrenOfLoggerElement(rootElement, root, true); } }
[ "protected", "void", "parseRoot", "(", "Element", "rootElement", ")", "{", "Logger", "root", "=", "repository", ".", "getRootLogger", "(", ")", ";", "// category configuration needs to be atomic", "synchronized", "(", "root", ")", "{", "parseChildrenOfLoggerElement", ...
Used internally to parse the roor category element.
[ "Used", "internally", "to", "parse", "the", "roor", "category", "element", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L450-L457
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.parseChildrenOfLoggerElement
protected void parseChildrenOfLoggerElement(Element catElement, Logger cat, boolean isRoot) { PropertySetter propSetter = new PropertySetter(cat); // Remove all existing appenders from cat. They will be // reconstructed if need be. cat.removeAllAppenders(); NodeList children ...
java
protected void parseChildrenOfLoggerElement(Element catElement, Logger cat, boolean isRoot) { PropertySetter propSetter = new PropertySetter(cat); // Remove all existing appenders from cat. They will be // reconstructed if need be. cat.removeAllAppenders(); NodeList children ...
[ "protected", "void", "parseChildrenOfLoggerElement", "(", "Element", "catElement", ",", "Logger", "cat", ",", "boolean", "isRoot", ")", "{", "PropertySetter", "propSetter", "=", "new", "PropertySetter", "(", "cat", ")", ";", "// Remove all existing appenders from cat. T...
Used internally to parse the children of a category element.
[ "Used", "internally", "to", "parse", "the", "children", "of", "a", "category", "element", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L463-L508
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.parseLayout
protected Layout parseLayout (Element layout_element) { String className = subst(layout_element.getAttribute(CLASS_ATTR)); LogLog.debug("Parsing layout of class: \""+className+"\""); try { Object instance = Loader.loadClass(className).newInstance(); Layout layout = (Layout)instance; ...
java
protected Layout parseLayout (Element layout_element) { String className = subst(layout_element.getAttribute(CLASS_ATTR)); LogLog.debug("Parsing layout of class: \""+className+"\""); try { Object instance = Loader.loadClass(className).newInstance(); Layout layout = (Layout)instance; ...
[ "protected", "Layout", "parseLayout", "(", "Element", "layout_element", ")", "{", "String", "className", "=", "subst", "(", "layout_element", ".", "getAttribute", "(", "CLASS_ATTR", ")", ")", ";", "LogLog", ".", "debug", "(", "\"Parsing layout of class: \\\"\"", "...
Used internally to parse a layout element.
[ "Used", "internally", "to", "parse", "a", "layout", "element", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L513-L546
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.parseLevel
protected void parseLevel(Element element, Logger logger, boolean isRoot) { String catName = logger.getName(); if(isRoot) { catName = "root"; } String priStr = subst(element.getAttribute(VALUE_ATTR)); LogLog.debug("Level value for "+catName+" is ["+priStr+"]."); if(INHERITED.equal...
java
protected void parseLevel(Element element, Logger logger, boolean isRoot) { String catName = logger.getName(); if(isRoot) { catName = "root"; } String priStr = subst(element.getAttribute(VALUE_ATTR)); LogLog.debug("Level value for "+catName+" is ["+priStr+"]."); if(INHERITED.equal...
[ "protected", "void", "parseLevel", "(", "Element", "element", ",", "Logger", "logger", ",", "boolean", "isRoot", ")", "{", "String", "catName", "=", "logger", ".", "getName", "(", ")", ";", "if", "(", "isRoot", ")", "{", "catName", "=", "\"root\"", ";", ...
Used internally to parse a level element.
[ "Used", "internally", "to", "parse", "a", "level", "element", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L561-L598
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.doConfigure
public void doConfigure(final InputStream inputStream, LoggerRepository repository) throws FactoryConfigurationError { ParseAction action = new ParseAction() { public Document parse(final DocumentBuilder parser) throws SAXException, IOException { ...
java
public void doConfigure(final InputStream inputStream, LoggerRepository repository) throws FactoryConfigurationError { ParseAction action = new ParseAction() { public Document parse(final DocumentBuilder parser) throws SAXException, IOException { ...
[ "public", "void", "doConfigure", "(", "final", "InputStream", "inputStream", ",", "LoggerRepository", "repository", ")", "throws", "FactoryConfigurationError", "{", "ParseAction", "action", "=", "new", "ParseAction", "(", ")", "{", "public", "Document", "parse", "("...
Configure log4j by reading in a log4j.dtd compliant XML configuration file.
[ "Configure", "log4j", "by", "reading", "in", "a", "log4j", ".", "dtd", "compliant", "XML", "configuration", "file", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L695-L709
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.subst
public static String subst(final String value, final Properties props) { try { return OptionConverter.substVars(value, props); } catch (IllegalArgumentException e) { LogLog.warn("Could not perform variable substitution.", e); return value; } }
java
public static String subst(final String value, final Properties props) { try { return OptionConverter.substVars(value, props); } catch (IllegalArgumentException e) { LogLog.warn("Could not perform variable substitution.", e); return value; } }
[ "public", "static", "String", "subst", "(", "final", "String", "value", ",", "final", "Properties", "props", ")", "{", "try", "{", "return", "OptionConverter", ".", "substVars", "(", "value", ",", "props", ")", ";", "}", "catch", "(", "IllegalArgumentExcepti...
Substitutes property value for any references in expression. @param value value from configuration file, may contain literal text, property references or both @param props properties. @return evaluated expression, may still contain expressions if unable to expand. @since 1.2.15
[ "Substitutes", "property", "value", "for", "any", "references", "in", "expression", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L937-L944
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.setParameter
public static void setParameter(final Element elem, final PropertySetter propSetter, final Properties props) { String name = subst(elem.getAttribute("name"), props); String value = (elem.getAttribute("value")); value = subst...
java
public static void setParameter(final Element elem, final PropertySetter propSetter, final Properties props) { String name = subst(elem.getAttribute("name"), props); String value = (elem.getAttribute("value")); value = subst...
[ "public", "static", "void", "setParameter", "(", "final", "Element", "elem", ",", "final", "PropertySetter", "propSetter", ",", "final", "Properties", "props", ")", "{", "String", "name", "=", "subst", "(", "elem", ".", "getAttribute", "(", "\"name\"", ")", ...
Sets a parameter based from configuration file content. @param elem param element, may not be null. @param propSetter property setter, may not be null. @param props properties @since 1.2.15
[ "Sets", "a", "parameter", "based", "from", "configuration", "file", "content", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L955-L962
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java
DOMConfigurator.parseElement
public static OptionHandler parseElement(final Element element, final Properties props, final Class expectedClass) throws Exception { String clazz = subst(element.getAttribute("class"), props); Object instance = Op...
java
public static OptionHandler parseElement(final Element element, final Properties props, final Class expectedClass) throws Exception { String clazz = subst(element.getAttribute("class"), props); Object instance = Op...
[ "public", "static", "OptionHandler", "parseElement", "(", "final", "Element", "element", ",", "final", "Properties", "props", ",", "final", "Class", "expectedClass", ")", "throws", "Exception", "{", "String", "clazz", "=", "subst", "(", "element", ".", "getAttri...
Creates an OptionHandler and processes any nested param elements but does not call activateOptions. If the class also supports UnrecognizedElementParser, the parseUnrecognizedElement method will be call for any child elements other than param. @param element element, may not be null. @param props proper...
[ "Creates", "an", "OptionHandler", "and", "processes", "any", "nested", "param", "elements", "but", "does", "not", "call", "activateOptions", ".", "If", "the", "class", "also", "supports", "UnrecognizedElementParser", "the", "parseUnrecognizedElement", "method", "will"...
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/extras/DOMConfigurator.java#L979-L1007
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/status/StatusData.java
StatusData.getFormattedStatus
public String getFormattedStatus() { final StringBuilder sb = new StringBuilder(); final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS"); sb.append(format.format(new Date(timestamp))); sb.append(SPACE); sb.append(getThreadName()); sb.append(SPACE...
java
public String getFormattedStatus() { final StringBuilder sb = new StringBuilder(); final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS"); sb.append(format.format(new Date(timestamp))); sb.append(SPACE); sb.append(getThreadName()); sb.append(SPACE...
[ "public", "String", "getFormattedStatus", "(", ")", "{", "final", "StringBuilder", "sb", "=", "new", "StringBuilder", "(", ")", ";", "final", "SimpleDateFormat", "format", "=", "new", "SimpleDateFormat", "(", "\"yyyy-MM-dd HH:mm:ss,SSS\"", ")", ";", "sb", ".", "...
Formats the StatusData for viewing. @return The formatted status data as a String.
[ "Formats", "the", "StatusData", "for", "viewing", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/status/StatusData.java#L120-L144
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
ThreadContext.putAll
public static void putAll(final Map<String, String> m) { if (contextMap instanceof ThreadContextMap2) { ((ThreadContextMap2) contextMap).putAll(m); } else if (contextMap instanceof DefaultThreadContextMap) { ((DefaultThreadContextMap) contextMap).putAll(m); } else { ...
java
public static void putAll(final Map<String, String> m) { if (contextMap instanceof ThreadContextMap2) { ((ThreadContextMap2) contextMap).putAll(m); } else if (contextMap instanceof DefaultThreadContextMap) { ((DefaultThreadContextMap) contextMap).putAll(m); } else { ...
[ "public", "static", "void", "putAll", "(", "final", "Map", "<", "String", ",", "String", ">", "m", ")", "{", "if", "(", "contextMap", "instanceof", "ThreadContextMap2", ")", "{", "(", "(", "ThreadContextMap2", ")", "contextMap", ")", ".", "putAll", "(", ...
Puts all given context map entries into the current thread's context map. <p>If the current thread does not have a context map it is created as a side effect.</p> @param m The map. @since 2.7
[ "Puts", "all", "given", "context", "map", "entries", "into", "the", "current", "thread", "s", "context", "map", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java#L248-L258
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
ThreadContext.getImmutableContext
public static Map<String, String> getImmutableContext() { final Map<String, String> map = contextMap.getImmutableMapOrNull(); return map == null ? EMPTY_MAP : map; }
java
public static Map<String, String> getImmutableContext() { final Map<String, String> map = contextMap.getImmutableMapOrNull(); return map == null ? EMPTY_MAP : map; }
[ "public", "static", "Map", "<", "String", ",", "String", ">", "getImmutableContext", "(", ")", "{", "final", "Map", "<", "String", ",", "String", ">", "map", "=", "contextMap", ".", "getImmutableMapOrNull", "(", ")", ";", "return", "map", "==", "null", "...
Returns an immutable view of the current thread's context Map. @return An immutable view of the ThreadContext Map.
[ "Returns", "an", "immutable", "view", "of", "the", "current", "thread", "s", "context", "Map", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java#L341-L344
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
ThreadContext.getImmutableStack
public static ContextStack getImmutableStack() { final ContextStack result = contextStack.getImmutableStackOrNull(); return result == null ? EMPTY_STACK : result; }
java
public static ContextStack getImmutableStack() { final ContextStack result = contextStack.getImmutableStackOrNull(); return result == null ? EMPTY_STACK : result; }
[ "public", "static", "ContextStack", "getImmutableStack", "(", ")", "{", "final", "ContextStack", "result", "=", "contextStack", ".", "getImmutableStackOrNull", "(", ")", ";", "return", "result", "==", "null", "?", "EMPTY_STACK", ":", "result", ";", "}" ]
Gets an immutable copy of this current thread's context stack. @return an immutable copy of the ThreadContext stack.
[ "Gets", "an", "immutable", "copy", "of", "this", "current", "thread", "s", "context", "stack", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java#L396-L399
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
ThreadContext.setStack
public static void setStack(final Collection<String> stack) { if (stack.isEmpty() || !useStack) { return; } contextStack.clear(); contextStack.addAll(stack); }
java
public static void setStack(final Collection<String> stack) { if (stack.isEmpty() || !useStack) { return; } contextStack.clear(); contextStack.addAll(stack); }
[ "public", "static", "void", "setStack", "(", "final", "Collection", "<", "String", ">", "stack", ")", "{", "if", "(", "stack", ".", "isEmpty", "(", ")", "||", "!", "useStack", ")", "{", "return", ";", "}", "contextStack", ".", "clear", "(", ")", ";",...
Sets this thread's stack. @param stack The stack to use.
[ "Sets", "this", "thread", "s", "stack", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java#L406-L412
train
ops4j/org.ops4j.pax.logging
pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java
ThreadContext.push
public static void push(final String message, final Object... args) { contextStack.push(ParameterizedMessage.format(message, args)); }
java
public static void push(final String message, final Object... args) { contextStack.push(ParameterizedMessage.format(message, args)); }
[ "public", "static", "void", "push", "(", "final", "String", "message", ",", "final", "Object", "...", "args", ")", "{", "contextStack", ".", "push", "(", "ParameterizedMessage", ".", "format", "(", "message", ",", "args", ")", ")", ";", "}" ]
Pushes new diagnostic context information for the current thread. <p> The contents of the <code>message</code> and args parameters are determined solely by the client. The message will be treated as a format String and tokens will be replaced with the String value of the arguments in accordance with ParameterizedMessa...
[ "Pushes", "new", "diagnostic", "context", "information", "for", "the", "current", "thread", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-api/src/main/java/org/apache/logging/log4j/ThreadContext.java#L478-L480
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/rolling/RollingPolicyBase.java
RollingPolicyBase.parseFileNamePattern
protected final void parseFileNamePattern() { List converters = new ArrayList(); List fields = new ArrayList(); ExtrasPatternParser.parse( fileNamePatternStr, converters, fields, null, ExtrasPatternParser.getFileNamePatternRules()); patternConverters = new PatternConverter[conve...
java
protected final void parseFileNamePattern() { List converters = new ArrayList(); List fields = new ArrayList(); ExtrasPatternParser.parse( fileNamePatternStr, converters, fields, null, ExtrasPatternParser.getFileNamePatternRules()); patternConverters = new PatternConverter[conve...
[ "protected", "final", "void", "parseFileNamePattern", "(", ")", "{", "List", "converters", "=", "new", "ArrayList", "(", ")", ";", "List", "fields", "=", "new", "ArrayList", "(", ")", ";", "ExtrasPatternParser", ".", "parse", "(", "fileNamePatternStr", ",", ...
Parse file name pattern.
[ "Parse", "file", "name", "pattern", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/rolling/RollingPolicyBase.java#L127-L139
train
ops4j/org.ops4j.pax.logging
pax-logging-service/src/main/java/org/apache/log4j/rolling/RollingPolicyBase.java
RollingPolicyBase.formatFileName
protected final void formatFileName( final Object obj, final StringBuffer buf) { for (int i = 0; i < patternConverters.length; i++) { int fieldStart = buf.length(); patternConverters[i].format(obj, buf); if (patternFields[i] != null) { patternFields[i].format(fieldStart, buf); }...
java
protected final void formatFileName( final Object obj, final StringBuffer buf) { for (int i = 0; i < patternConverters.length; i++) { int fieldStart = buf.length(); patternConverters[i].format(obj, buf); if (patternFields[i] != null) { patternFields[i].format(fieldStart, buf); }...
[ "protected", "final", "void", "formatFileName", "(", "final", "Object", "obj", ",", "final", "StringBuffer", "buf", ")", "{", "for", "(", "int", "i", "=", "0", ";", "i", "<", "patternConverters", ".", "length", ";", "i", "++", ")", "{", "int", "fieldSt...
Format file name. @param obj object to be evaluted in formatting, may not be null. @param buf string buffer to which formatted file name is appended, may not be null.
[ "Format", "file", "name", "." ]
493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d
https://github.com/ops4j/org.ops4j.pax.logging/blob/493de4e1db4fe9f981f3dd78b8e40e5bf2b2e59d/pax-logging-service/src/main/java/org/apache/log4j/rolling/RollingPolicyBase.java#L147-L157
train
FilipPudak/ProgressPieView
library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java
ProgressPieView.animateProgressFill
public void animateProgressFill(int animateTo) { mAnimationHandler.removeMessages(0); if (animateTo > mMax || animateTo < 0) { throw new IllegalArgumentException( String.format("Animation progress (%d) is greater than the max progress (%d) or lower than 0 ", animateTo, mM...
java
public void animateProgressFill(int animateTo) { mAnimationHandler.removeMessages(0); if (animateTo > mMax || animateTo < 0) { throw new IllegalArgumentException( String.format("Animation progress (%d) is greater than the max progress (%d) or lower than 0 ", animateTo, mM...
[ "public", "void", "animateProgressFill", "(", "int", "animateTo", ")", "{", "mAnimationHandler", ".", "removeMessages", "(", "0", ")", ";", "if", "(", "animateTo", ">", "mMax", "||", "animateTo", "<", "0", ")", "{", "throw", "new", "IllegalArgumentException", ...
Animates a progress fill of the view, using a Handler. @param animateTo - the progress value the animation should stop at (0 - MAX)
[ "Animates", "a", "progress", "fill", "of", "the", "view", "using", "a", "Handler", "." ]
3588947b0c68135f8cff22cf7aa9bceda9fb4c72
https://github.com/FilipPudak/ProgressPieView/blob/3588947b0c68135f8cff22cf7aa9bceda9fb4c72/library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java#L274-L283
train
FilipPudak/ProgressPieView
library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java
ProgressPieView.setTextSize
public void setTextSize(int sizeSp) { mTextSize = sizeSp * mDisplayMetrics.scaledDensity; mTextPaint.setTextSize(mTextSize); invalidate(); }
java
public void setTextSize(int sizeSp) { mTextSize = sizeSp * mDisplayMetrics.scaledDensity; mTextPaint.setTextSize(mTextSize); invalidate(); }
[ "public", "void", "setTextSize", "(", "int", "sizeSp", ")", "{", "mTextSize", "=", "sizeSp", "*", "mDisplayMetrics", ".", "scaledDensity", ";", "mTextPaint", ".", "setTextSize", "(", "mTextSize", ")", ";", "invalidate", "(", ")", ";", "}" ]
Sets the text size. @param sizeSp in sp for the text
[ "Sets", "the", "text", "size", "." ]
3588947b0c68135f8cff22cf7aa9bceda9fb4c72
https://github.com/FilipPudak/ProgressPieView/blob/3588947b0c68135f8cff22cf7aa9bceda9fb4c72/library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java#L424-L428
train
FilipPudak/ProgressPieView
library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java
ProgressPieView.setStrokeWidth
public void setStrokeWidth(int widthDp) { mStrokeWidth = widthDp * mDisplayMetrics.density; mStrokePaint.setStrokeWidth(mStrokeWidth); invalidate(); }
java
public void setStrokeWidth(int widthDp) { mStrokeWidth = widthDp * mDisplayMetrics.density; mStrokePaint.setStrokeWidth(mStrokeWidth); invalidate(); }
[ "public", "void", "setStrokeWidth", "(", "int", "widthDp", ")", "{", "mStrokeWidth", "=", "widthDp", "*", "mDisplayMetrics", ".", "density", ";", "mStrokePaint", ".", "setStrokeWidth", "(", "mStrokeWidth", ")", ";", "invalidate", "(", ")", ";", "}" ]
Set the stroke width. @param widthDp in dp for the pie border
[ "Set", "the", "stroke", "width", "." ]
3588947b0c68135f8cff22cf7aa9bceda9fb4c72
https://github.com/FilipPudak/ProgressPieView/blob/3588947b0c68135f8cff22cf7aa9bceda9fb4c72/library/src/main/java/com/filippudak/ProgressPieView/ProgressPieView.java#L506-L510
train
sachin-handiekar/jMusixMatch
src/main/java/org/jmusixmatch/MusixMatch.java
MusixMatch.getLyrics
public Lyrics getLyrics(int trackID) throws MusixMatchException { Lyrics lyrics = null; LyricsGetMessage message = null; Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, apiKey); params.put(Constants.TRACK_ID, new String("" + trackID)); String response = null; r...
java
public Lyrics getLyrics(int trackID) throws MusixMatchException { Lyrics lyrics = null; LyricsGetMessage message = null; Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, apiKey); params.put(Constants.TRACK_ID, new String("" + trackID)); String response = null; r...
[ "public", "Lyrics", "getLyrics", "(", "int", "trackID", ")", "throws", "MusixMatchException", "{", "Lyrics", "lyrics", "=", "null", ";", "LyricsGetMessage", "message", "=", "null", ";", "Map", "<", "String", ",", "Object", ">", "params", "=", "new", "HashMap...
Get Lyrics for the specific trackID. @param trackID @return @throws MusixMatchException
[ "Get", "Lyrics", "for", "the", "specific", "trackID", "." ]
da909f7732053a801ea7282fe9a8bce385fa3763
https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L49-L73
train
sachin-handiekar/jMusixMatch
src/main/java/org/jmusixmatch/MusixMatch.java
MusixMatch.getSnippet
public Snippet getSnippet(int trackID) throws MusixMatchException { Snippet snippet = null; SnippetGetMessage message = null; Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, apiKey); params.put(Constants.TRACK_ID, new String("" + trackID...
java
public Snippet getSnippet(int trackID) throws MusixMatchException { Snippet snippet = null; SnippetGetMessage message = null; Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, apiKey); params.put(Constants.TRACK_ID, new String("" + trackID...
[ "public", "Snippet", "getSnippet", "(", "int", "trackID", ")", "throws", "MusixMatchException", "{", "Snippet", "snippet", "=", "null", ";", "SnippetGetMessage", "message", "=", "null", ";", "Map", "<", "String", ",", "Object", ">", "params", "=", "new", "Ha...
Get Snippet for the specified trackID. @param trackID @return @throws MusixMatchException
[ "Get", "Snippet", "for", "the", "specified", "trackID", "." ]
da909f7732053a801ea7282fe9a8bce385fa3763
https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L82-L106
train
sachin-handiekar/jMusixMatch
src/main/java/org/jmusixmatch/MusixMatch.java
MusixMatch.getSubtitle
public Subtitle getSubtitle(int trackID) throws MusixMatchException { Subtitle subtitle = null; SubtitleGetMessage message = null; Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, apiKey); params.put(Constants.TRACK_ID, new String("" + tr...
java
public Subtitle getSubtitle(int trackID) throws MusixMatchException { Subtitle subtitle = null; SubtitleGetMessage message = null; Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, apiKey); params.put(Constants.TRACK_ID, new String("" + tr...
[ "public", "Subtitle", "getSubtitle", "(", "int", "trackID", ")", "throws", "MusixMatchException", "{", "Subtitle", "subtitle", "=", "null", ";", "SubtitleGetMessage", "message", "=", "null", ";", "Map", "<", "String", ",", "Object", ">", "params", "=", "new", ...
Get Subtitle for the specific trackID. @param trackID @return @throws MusixMatchException
[ "Get", "Subtitle", "for", "the", "specific", "trackID", "." ]
da909f7732053a801ea7282fe9a8bce385fa3763
https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L117-L142
train
sachin-handiekar/jMusixMatch
src/main/java/org/jmusixmatch/MusixMatch.java
MusixMatch.searchTracks
public List<Track> searchTracks(String q, String q_artist, String q_track, int page, int pageSize, boolean f_has_lyrics) throws MusixMatchException { List<Track> trackList = null; TrackSeachMessage message = null; Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, a...
java
public List<Track> searchTracks(String q, String q_artist, String q_track, int page, int pageSize, boolean f_has_lyrics) throws MusixMatchException { List<Track> trackList = null; TrackSeachMessage message = null; Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, a...
[ "public", "List", "<", "Track", ">", "searchTracks", "(", "String", "q", ",", "String", "q_artist", ",", "String", "q_track", ",", "int", "page", ",", "int", "pageSize", ",", "boolean", "f_has_lyrics", ")", "throws", "MusixMatchException", "{", "List", "<", ...
Search tracks using the given criteria. @param q search into every available field (track_name,artist_name,lyrics) @param q_artist search for text string among artist names @param q_track search for text string among track names @param page request specific result page @param pageSize specify number of items per resul...
[ "Search", "tracks", "using", "the", "given", "criteria", "." ]
da909f7732053a801ea7282fe9a8bce385fa3763
https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L164-L206
train
sachin-handiekar/jMusixMatch
src/main/java/org/jmusixmatch/MusixMatch.java
MusixMatch.getTrack
public Track getTrack(int trackID) throws MusixMatchException { Track track = new Track(); Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, apiKey); params.put(Constants.TRACK_ID, new String("" + trackID)); track = getTrackResponse(Methods.TRACK_GET, params); retu...
java
public Track getTrack(int trackID) throws MusixMatchException { Track track = new Track(); Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, apiKey); params.put(Constants.TRACK_ID, new String("" + trackID)); track = getTrackResponse(Methods.TRACK_GET, params); retu...
[ "public", "Track", "getTrack", "(", "int", "trackID", ")", "throws", "MusixMatchException", "{", "Track", "track", "=", "new", "Track", "(", ")", ";", "Map", "<", "String", ",", "Object", ">", "params", "=", "new", "HashMap", "<", "String", ",", "Object"...
Get the track details using the specified trackId. @param trackID track identifier in musiXmatch catalog @return the track @throws MusixMatchException
[ "Get", "the", "track", "details", "using", "the", "specified", "trackId", "." ]
da909f7732053a801ea7282fe9a8bce385fa3763
https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L216-L226
train
sachin-handiekar/jMusixMatch
src/main/java/org/jmusixmatch/MusixMatch.java
MusixMatch.getMatchingTrack
public Track getMatchingTrack(String q_track, String q_artist) throws MusixMatchException { Track track = new Track(); Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, apiKey); params.put(Constants.QUERY_TRACK, q_track); params.put(Constants.QUERY_ARTIST, q_artist)...
java
public Track getMatchingTrack(String q_track, String q_artist) throws MusixMatchException { Track track = new Track(); Map<String, Object> params = new HashMap<String, Object>(); params.put(Constants.API_KEY, apiKey); params.put(Constants.QUERY_TRACK, q_track); params.put(Constants.QUERY_ARTIST, q_artist)...
[ "public", "Track", "getMatchingTrack", "(", "String", "q_track", ",", "String", "q_artist", ")", "throws", "MusixMatchException", "{", "Track", "track", "=", "new", "Track", "(", ")", ";", "Map", "<", "String", ",", "Object", ">", "params", "=", "new", "Ha...
Get the most matching track which was retrieved using the search. @param q_track search for text string among track names @param q_artist search for text string among artist names @return the track @throws MusixMatchException
[ "Get", "the", "most", "matching", "track", "which", "was", "retrieved", "using", "the", "search", "." ]
da909f7732053a801ea7282fe9a8bce385fa3763
https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L238-L250
train
sachin-handiekar/jMusixMatch
src/main/java/org/jmusixmatch/MusixMatch.java
MusixMatch.getTrackResponse
private Track getTrackResponse(String methodName, Map<String, Object> params) throws MusixMatchException { Track track = new Track(); String response = null; TrackGetMessage message = null; response = MusixMatchRequest.sendRequest(Helper.getURLString( methodName, params)); Gson gson = new Gson(); ...
java
private Track getTrackResponse(String methodName, Map<String, Object> params) throws MusixMatchException { Track track = new Track(); String response = null; TrackGetMessage message = null; response = MusixMatchRequest.sendRequest(Helper.getURLString( methodName, params)); Gson gson = new Gson(); ...
[ "private", "Track", "getTrackResponse", "(", "String", "methodName", ",", "Map", "<", "String", ",", "Object", ">", "params", ")", "throws", "MusixMatchException", "{", "Track", "track", "=", "new", "Track", "(", ")", ";", "String", "response", "=", "null", ...
Returns the track response which was returned through the query. @param methodName the name of the API method. @param params a map which contains the key-value pair @return the track details. @throws MusixMatchException if any error occurs.
[ "Returns", "the", "track", "response", "which", "was", "returned", "through", "the", "query", "." ]
da909f7732053a801ea7282fe9a8bce385fa3763
https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L263-L285
train
sachin-handiekar/jMusixMatch
src/main/java/org/jmusixmatch/MusixMatch.java
MusixMatch.handleErrorResponse
private void handleErrorResponse(String jsonResponse) throws MusixMatchException { StatusCode statusCode; Gson gson = new Gson(); System.out.println(jsonResponse); ErrorMessage errMessage = gson.fromJson(jsonResponse, ErrorMessage.class); int responseCode = errMessage.getMessageContainer().getHeader(...
java
private void handleErrorResponse(String jsonResponse) throws MusixMatchException { StatusCode statusCode; Gson gson = new Gson(); System.out.println(jsonResponse); ErrorMessage errMessage = gson.fromJson(jsonResponse, ErrorMessage.class); int responseCode = errMessage.getMessageContainer().getHeader(...
[ "private", "void", "handleErrorResponse", "(", "String", "jsonResponse", ")", "throws", "MusixMatchException", "{", "StatusCode", "statusCode", ";", "Gson", "gson", "=", "new", "Gson", "(", ")", ";", "System", ".", "out", ".", "println", "(", "jsonResponse", "...
Handle the error response. @param jsonResponse the jsonContent. @throws MusixMatchException if any error occurs
[ "Handle", "the", "error", "response", "." ]
da909f7732053a801ea7282fe9a8bce385fa3763
https://github.com/sachin-handiekar/jMusixMatch/blob/da909f7732053a801ea7282fe9a8bce385fa3763/src/main/java/org/jmusixmatch/MusixMatch.java#L295-L332
train