FOCUS Software Engineering has a new name: proconX - Professional Fieldbus Connections   

Logger Class Reference

List of all members.

Detailed Description

Logger class.

Used for debugging and performance analysis.

Logging can be enabled and configured via an optional logger.properties file and programmatically during run-time. The logger.properties is searched in the current directory.

Sample logger.properties file:

#
# Logger configuration file
#

# Set to true to enable logging in principle
logger.enable=true

# Exception category
logger.category.EXCP=true

# Function category
logger.category.FUNC=true

# Send category
logger.category.SEND=true

# Receive category
logger.category.RECV=true

Version:
2.0
See also:
PrintStream


Print and Output Routines

synchronized void println (String text)
 Prints a log message.

synchronized void println (String text, int val1)
 Prints a log message including 1 integer parameter.

synchronized void println (String text, int val1, int val2)
 Prints a log message including 2 integer parameters.

synchronized void println (String text, int val1, int val2, int val3)
 Prints a log message including 3 integer parameters.

synchronized void println (String text, int val1, int val2, int val3, int val4)
 Prints a log message including 4 integer parameters.

synchronized void printHexDump (byte[] dataArr, int ofs, int len)
 Prints an array of bytes in hexadecimal notation.

synchronized void printAsciiDump (byte[] dataArr, int ofs, int len)
 Interprets the data bytes as ASCII characters and outStream.prints them.


Logger Configuration

synchronized void loggerEnable ()
 Enables logging to stdout.

synchronized void loggerDisable ()
 Disbles logging.

synchronized void categoryEnable (String categoryName)
 Enabled log outputs for this category.

synchronized void categoryDisable (String categoryName)
 Disables log outputs for this category.


Public Member Functions

 Logger (String categoryName)
 Creates a new Logger instance.


Static Package Functions

 [static initializer]
 Create static context and loads logger.proprties configuration file.


Constructor & Destructor Documentation

Logger String  categoryName  ) 
 

Creates a new Logger instance.

Parameters:
categoryName A log category name (typically 4 letters)


Member Function Documentation

synchronized void categoryEnable String  categoryName  )  [static]
 

Enabled log outputs for this category.

Parameters:
categoryName The log category name

synchronized void categoryDisable String  categoryName  )  [static]
 

Disables log outputs for this category.

Parameters:
categoryName The log category name

synchronized void println String  text  ) 
 

Prints a log message.

Parameters:
text Log text

synchronized void println String  text,
int  val1
 

Prints a log message including 1 integer parameter.

Parameters:
text Log text
val1 Integer value

synchronized void println String  text,
int  val1,
int  val2
 

Prints a log message including 2 integer parameters.

Parameters:
text Log text
val1 Integer value
val2 Integer value

synchronized void println String  text,
int  val1,
int  val2,
int  val3
 

Prints a log message including 3 integer parameters.

Parameters:
text Log text
val1 Integer value
val2 Integer value
val3 Integer value

synchronized void println String  text,
int  val1,
int  val2,
int  val3,
int  val4
 

Prints a log message including 4 integer parameters.

Parameters:
text Log text
val1 Integer value
val2 Integer value
val3 Integer value
val4 Integer value

synchronized void printHexDump byte[]  dataArr,
int  ofs,
int  len
 

Prints an array of bytes in hexadecimal notation.

Parameters:
dataArr Data bytes to outStream.print as chars
ofs Subarray offset
len Number of bytes to outStream.print

synchronized void printAsciiDump byte[]  dataArr,
int  ofs,
int  len
 

Interprets the data bytes as ASCII characters and outStream.prints them.

Parameters:
dataArr Data bytes to outStream.print as chars
ofs Subarray offset
len Number of bytes to outStream.print

   Back | Top of page Info | Support | Contact | About   
Information in this document is subject to change without notice. Copyright © 2000-2007 proconX Pty Ltd. All rights reserved.
All product and brand names mentioned on this page may be trademarks or registered trademarks of their respective owners.