Skip to content

General purpose logger library for AIR-based AS3/Flex projects. Currently logs to the console and/or a file.

License

Notifications You must be signed in to change notification settings

ciacob/logger-library

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

logger-library

General purpose logger library for AIR-based AS3/Flex projects. Currently logs to the console and/or a file. Also has built-in formatting and helper tools, such as the ability to hard-wrap the output, draw separators, or print information about the Flash PLayer VM currently executing the code. When writing to disc, older log messages can be archived or replaced.

Usage

Depending on your needs, you can use the library in two ways:

  1. Statically, via the L class (less code, but less flexible):
L.p ('Lorem Ipsum dolor sit');
  1. Dynamically, by configuring and initializing the logger first (more verbose, but lets you choose output type):
const enabled : Boolean = true;
const mode : int = LoggerConfig.CONSOLE | LoggerConfig.FILE;
const customDir : File = File.desktopDirectory;
const config : LoggerConfig = new LoggerConfig (enabled, mode, customDir);
var logger :  Logger = new Logger(config);
logger.print ('Lorem Ipsum dolor sit');

Note that you can do in-flight reconfiguration via, e.g.:

logger.applyConfiguration (otherConfig);

Check class Logger for all available API.

About

General purpose logger library for AIR-based AS3/Flex projects. Currently logs to the console and/or a file.

Topics

Resources

License

Stars

Watchers

Forks