Prev | Current Page 601 | Next

L. McColl-Sylvester and F. Ponticelli

"Professional haXe and Neko"


As any data provided by the Exception class will likely require more focus, functionality should exist to
highlight log data of interest. One way this can be achieved would be to append customizable header
and footer values to such content supplying a default string value. At this current stage, it is assumed
that all data output from the logger will be stored in a sequential stream or file of some sort, but that
might not always be the case, so alternative functionality should be easily appended to any output.
Begin with the data handling for the Logger class. To start things off, you ??™ re going to require some basic
values:
class Logger
{
public static var useSingleLogFile : Bool = false;
public static var logFileName : String = ???Log???;
public static var location : String = ???logs/???;
private static function getLogFileName()
??‘
??‘
??‘
??‘
??‘
(continued)
312
Part II: Server Side, JavaScript, and Flash: Oh My!
{
var filename = logFileName;
if ( useSingleLogFile == false )
{
var day = Date.


Pages:
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613