A simple logging tool to make console outputs look prettier...
allprojects {
repositories {
// ... other sources
maven { url 'https://jitpack.io/#in.mcxiv' }
}
}
dependencies {
// ... other dependencies
// Include the library as a dependency.
// Replace TAG_NAME with the number aside jitpack badge.
implementation 'in.mcxiv:MyLOGGER:TAG_NAME'
// Optional: To use the annotation processor version instead.
annotationProcessor 'in.mcxiv:MyLOGGER:TAG_NAME'
}
// Default initialisation, to print to Console.
FLog logger = FLog.getNew();
// The annotation processor version.
FLog logger = ALog.getNew();
// To write logs to to a file "Hello.txt".
FLog logger = FileLog.getNew("new.txt");
// to use a custom Decoration
log.setDecorationType(Decorations.TAG); // enable tag decos.
log.setDecorationType(Decorations.RAW); // enable raw decos, ie, no strange characters.
// creating a logger to both, print to console and write to file.
FLog log = ULog.forNew()
.add(FLog.getNew())
.add(FileLog.getNew("new.txt"))
.create();
// Print formatted text
logger.prt(arg1, arg2, arg3 ... argn);
// Print unformatted text
log.raw(arg);