Package net.orbyfied.j8.util.logging
Class LogPipeline
java.lang.Object
net.orbyfied.j8.util.logging.LogPipeline
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddFirst(LogHandler handler) Adds a handler to the pipeline, putting it in the named map if it has a name.addLast(LogHandler handler) Adds a handler to the pipeline, putting it in the named map if it has a name.all()Get a list of all handlers in order.intcount()Get the amount of handlers.get(int i) Get a handler by index if inbound, or null if out of bounds.Get a handler by name if present, or null if absent.voidPushes a logging record into the pipeline, passing it down through all handlers.Removes a handler by name if present, or doesn't do anything if absent.remove(LogHandler handler) Remove a handler from the pipeline.
-
Constructor Details
-
LogPipeline
public LogPipeline()
-
-
Method Details
-
push
Pushes a logging record into the pipeline, passing it down through all handlers.- Parameters:
record- The record.
-
count
public int count()Get the amount of handlers.- Returns:
- The count.
-
all
Get a list of all handlers in order.- Returns:
- The list.
-
get
Get a handler by index if inbound, or null if out of bounds.- Parameters:
i- The index.- Returns:
- The handler or null.
-
get
Get a handler by name if present, or null if absent.- Parameters:
name- The name.- Returns:
- The handler or null.
-
remove
Removes a handler by name if present, or doesn't do anything if absent.- Parameters:
name- The name.- Returns:
- This.
-
remove
Remove a handler from the pipeline.- Parameters:
handler- The handler.- Returns:
- This.
-
addLast
Adds a handler to the pipeline, putting it in the named map if it has a name. It will search for an index if a priority is set, otherwise it will just add it to the tail of the list. It uses the approximated index as a starting point to the search for a priority. It will search for the end of the block of priority (henceaddLast).- Parameters:
handler- The handler.- Returns:
- This.
-
addFirst
Adds a handler to the pipeline, putting it in the named map if it has a name. It will search for an index if a priority is set, otherwise it will just add it to the start of the list. It uses the approximated index as a starting point to the search for a priority. It will search for the start of the block of priority (henceaddFirst).- Parameters:
handler- The handler.- Returns:
- This.
-