Package net.minheur.potoflux.logger
Class PtfLogger
java.lang.Object
net.minheur.potoflux.logger.PtfLogger
Class used to log in potoflux.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildPrefix(String... data) Builder retuningbuildPrefix(List), but with the categories as a vararg.static StringbuildPrefix(List<String> data) Method to get the prefix of the command.
It contains the time, and all the components given in args.static StringbuildWithCategory(String category, String message, List<String> more) Builds the message with a main categorystatic voidPrint an error log message, with a content and optional categoriesstatic voiderror(String message, ILogCategory category, String... extraCategories) Print an error log message, with a content, a main log category (in the form of anILogCategory) and optional categoriesstatic voidPrint an info log message, with a content and optional categoriesstatic voidinfo(String message, ILogCategory category, String... extraCategories) Print an info log message, with a content, a main log category (in the form of anILogCategory) and optional categoriesstatic voidPrint a warning log message, with a content and optional categoriesstatic voidwarning(String message, ILogCategory category, String... extraCategories) Print a warning log message, with a content, a main log category (in the form of anILogCategory) and optional categories
-
Constructor Details
-
PtfLogger
public PtfLogger()
-
-
Method Details
-
buildPrefix
Method to get the prefix of the command.
It contains the time, and all the components given in args. They are put in between[]- Parameters:
data- the list of components to add to the prefix- Returns:
- the built prefix
-
buildPrefix
Builder retuningbuildPrefix(List), but with the categories as a vararg.- Parameters:
data- vararg of the categories- Returns:
- the built prefix
-
buildWithCategory
Builds the message with a main category- Parameters:
category- main category of the messagemessage- content of the logmore- adds more categories to the log- Returns:
- the message
-
info
Print an info log message, with a content and optional categories- Parameters:
message- content of the logextraCategories- optional categories of the log
-
info
Print an info log message, with a content, a main log category (in the form of anILogCategory) and optional categories- Parameters:
message- content of the logcategory- main category of the log, should be aILogCategoryextraCategories- optional categories of the log
-
warning
Print a warning log message, with a content and optional categories- Parameters:
message- content of the logextraCategories- optional categories of the log
-
warning
Print a warning log message, with a content, a main log category (in the form of anILogCategory) and optional categories- Parameters:
message- content of the logcategory- main category of the log, should be aILogCategoryextraCategories- optional categories of the log
-
error
Print an error log message, with a content and optional categories- Parameters:
message- content of the logextraCategories- optional categories of the log
-
error
Print an error log message, with a content, a main log category (in the form of anILogCategory) and optional categories- Parameters:
message- content of the logcategory- main category of the log, should be aILogCategoryextraCategories- optional categories of the log
-