log_pro 0.0.3 log_pro: ^0.0.3 copied to clipboard
log_pro is a custom logging package for Flutter that simplifies tracking and debugging app behavior.
log_pro #
log_pro is a custom logging package for Flutter that simplifies tracking and debugging app behavior. It supports various log levels, such as debug, info, warning, and error, allowing developers to categorize and filter logs effectively.
Resources: #
Getting Started #
Just create an instance of LogPro
and start logging:
LogPro logPro = LogPro();
logPro.error("error");
Output #
Default styles
[log]
╔════════════════════════════════════════════════════════════════════════════════════
║[ERROR][00:26:54.170]:
║message
╚════════════════════════════════════════════════════════════════════════════════════
Simple styles
+ [log] [ERROR]:message
Use Print instead of log
+ D/EGL_emulation(24250): app_time_stats: avg=376.97ms min=9.17ms max=4292.33ms count=12
+ I/flutter (24250):
+ I/flutter (24250): ╔════════════════════════════════════════════════════════════════════════════════════
+ I/flutter (24250): ║[ERROR][00:41:29.720]:
+ I/flutter (24250): ║Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem
+ I/flutter (24250): ║Ipsum has been the industry's standard dummy text ever since the 1500s, when an
+ I/flutter (24250): ║unknown printer took a galley of type and scrambled it to make a type specimen book.
+ I/flutter (24250): ║It has survived not only five centuries, but also the leap into electronic
+ I/flutter (24250): ║typesetting, remaining essenti
+ I/flutter (24250): ╚════════════════════════════════════════════════════════════════════════════════════
+
Output Images #
Default styles
Simple styles
Custom styles ex (line length - border shape)
Custom message styles (Default - Divided into equal lines - Put a border at the beginning of each line)
Use Print instead of log
Documentation #
Log level #
You can log with different levels:
LogPro logPro = LogPro();
logPro.info("info");
logPro.error("error");
logPro.normal("normal");
logPro.warning("warning");
logPro.magenta("magenta");
logPro.logit("logit");
logPro.grey("grey");
logPro.green("green");
logPro.risk("risk");
logPro.whiteBlack("whiteBlack");
logPro.prt("go", logColor: LogColors.red);
Customize
LogPro printIt = LogPro(
title: "LogPro",
usePrint: false,
lineLength: 100,
addEnterAtFirst: true,
splitMsgToSameLineLength: true,
splitMsgToSameLineLengthAddLeading: true,
msgStartInNewLine: true,
lineShape: "═",
makeTitleSameWidth: false,
fullLineTitleAndTime: false,
simpleBorderOneLine: false,
simpleShapeLog: false,
);
Options #
When you are finished with the debugging stage, you can stop LogPro without delete or commit it.
LogPro logPro = LogPro(
isLoggingEnabled: false,
);