Boks Logger is a library for printing data to console and actually logging it to files

Basic Example

import 'package:boks_logger/boks_logger.dart';

void main() {"blue message");      // out: <h:M:s> [INFO] blue message
  logger.debug("white message");    // out: <h:M:s> [DEBUG] white message
  logger.success("green message");  // out: <h:M:s> [SUCCESS] green message
  logger.warning("yellow message"); // out: <h:M:s> [WARNING] yellow message
  logger.error("red message");      // out: <h:M:s> [ERROR] red message

  logger.fatal("very red message"); // out: <h:M:s> [FATAL] very red message


Info, Debug, Success, Warning, Error:

void debug(String message);
void info(String message);
void success(String message);
void warning(String message);
void error(String message);
  • String message = The message to be printed and logger comes out as <h:M:s> [$SEVERITY] $message where <h:M:s> is the current time.
Usage example"the 3 numbers on the back of your mom's credit card is crutial for the mission");
logger.error("credit card details not acquired");

Fatal error:

void fatal(String message, [Exception exception]);
  • String message = The message to be printed and logger comes out as <h:M:s> [FATAL] $message
  • Exception exception = Throw's this exception (not at the fatal() call for now, i'll fix that)
Usage example
logger.fatal("r/cringetopia voted, i am now 98% cringe 1% satire and 1% meta, i must go");

Creating new loggers

class Logger({bool useAmerican: false});


  • bool useAmerican = If set to true will use M-d-y for the log file name, false by default

Usage example

Logger myLogger = Logger(useAmerican: true); // uses american version of log file

myLogger.currentSeverity = Severity.Success; // only messages from success or above will be printed
myLogger.debugColor = AnsiPen(); // makes the debug print black on the terminal, needs to import ansicolor

myLogger.debug("what if this text was black, that would cool i think");


  • Paulo Henrique Tulio - at least my name's there - PauloBoks
  • Devon Galat - Actual code - vxern

To do

Proper documentation