VMware vCloud Suite SDK Perl
The VMware vCloud Suite SDK for Perl supports the client-side vCloud Suite API for access to vCloud services and capabilities
|
Public Attributes | |
scalar | FAILURE |
scalar | SUCCESS |
hash | verbosity |
Avaliable Methods | |
private method | writeToScreen () |
private method | writeLog () |
private method | open_log () |
public method | set_verbosity () |
public method | new_instance () |
public method | InstanceExists () |
public method | get_log_name () |
public method | SetChannelLength () |
public method | get_instance () |
public method | log_dumper () |
public method | log_verbose () |
public method | get_logpath () |
public method | close_log () |
public method | CallingPackage () |
public method | getCurrentTime () |
public method | set_logpath () |
public method | get_zip_path () |
public method | log_framework () |
public method | prepareLogs () |
public method | CallingFunction () |
public method | log_info () |
public method | log_error () |
public method | formatString () |
public method | log_warning () |
public method | log_debug () |
This class lets you control the logging behavior. It allows you to control logging messages written to the screen through various verbosity level (0-7) You could change the level or turn off logging capability to the screen anytime.
# use Com::Vmware::Vapi::Util::Logger qw(log_info log_error); # log_error(MSG=>"Proceed with caution..."); # set_logpath(XMLFile=>"Test.Logger.First.xml"); # log_info(Channel=> "mylogs", MSG=>"VAPI Perl SDK Rocks...Way to go");
public method Com::Vmware::Vapi::Util::Logger::CallingFunction | ( | ) |
Return name of calling function
SUCCESS or exception on failure. |
# CallingPackage
public method Com::Vmware::Vapi::Util::Logger::CallingPackage | ( | ) |
Return name of calling package
SUCCESS or exception on failure. |
# CallingPackage
public method Com::Vmware::Vapi::Util::Logger::close_log | ( | ) |
A private method to close the log file in the launch host
None |
None |
# close_log();
public method Com::Vmware::Vapi::Util::Logger::formatString | ( | ) |
A private method to customize number of characters in a string and return string removing charcters more than the length specified or add white spaces accordingly.
String | - string name |
Formatted String |
# formatString(String => "ChangeString");
public method Com::Vmware::Vapi::Util::Logger::get_instance | ( | ) |
This method is called to get the current object instance or create a new one by calling new_instance().
An object instance |
# my $instance = get_instance()
public method Com::Vmware::Vapi::Util::Logger::get_log_name | ( | ) |
A public method which returns the path to log file
None |
None |
# get_log_name();
public method Com::Vmware::Vapi::Util::Logger::get_logpath | ( | ) |
A public method which returns the path to log direcory
None |
None |
# get_logpath();
public method Com::Vmware::Vapi::Util::Logger::get_zip_path | ( | ) |
A public method which returns the path to zip direcory
None |
None |
# get_zip_path();
public method Com::Vmware::Vapi::Util::Logger::getCurrentTime | ( | ) |
A private method to get current time stamp
None |
None |
# getCurrentTime();
public method Com::Vmware::Vapi::Util::Logger::InstanceExists | ( | ) |
A Public method to return the current instance if it exist
An object instance |
# my $instance = InstanceExists()
public method Com::Vmware::Vapi::Util::Logger::log_debug | ( | ) |
A Public method to print log debug message
None |
# log_debug(MSG=>"This is a debug message");
public method Com::Vmware::Vapi::Util::Logger::log_dumper | ( | ) |
A Public method to print Data:Dumper for the given data type
None |
# LogFramework (MSG=>"This is a debug message");
public method Com::Vmware::Vapi::Util::Logger::log_error | ( | ) |
A Public method to print log error message
None |
# log_error(MSG=>"This is a error message");
public method Com::Vmware::Vapi::Util::Logger::log_framework | ( | ) |
A Public method to print log framework debug messages
None |
# LogFramework (MSG=>"This is a debug message");
public method Com::Vmware::Vapi::Util::Logger::log_info | ( | ) |
A Public method to print log info message
None |
# log_info(MSG=>"This is a info message");
public method Com::Vmware::Vapi::Util::Logger::log_verbose | ( | ) |
A Public method to print log info message
None |
# log_verbose(MSG=>"This is a info message");
public method Com::Vmware::Vapi::Util::Logger::log_warning | ( | ) |
A Public method to print log warning message
None |
# log_warning(MSG=>"This is a warning message");
public method Com::Vmware::Vapi::Util::Logger::new_instance | ( | ) |
Undocumented Method
private method Com::Vmware::Vapi::Util::Logger::open_log | ( | ) |
A private method to open a log file in the launch host
None |
# open_log();
public method Com::Vmware::Vapi::Util::Logger::prepareLogs | ( | ) |
A private method to prepare test and log path with the time stamp
None |
None |
# prepareLogs();
public method Com::Vmware::Vapi::Util::Logger::set_logpath | ( | ) |
A public method to get the XMLFile information and creates log directories
XMLFile | - Full path to the XML file |
None |
# set_logpath (XMLFile => "/source/Proj/ctd/unreviewed/TestLogger.xml");
public method Com::Vmware::Vapi::Util::Logger::set_verbosity | ( | ) |
A public method to set verbosity for the logger object
Level | Verbosity Level |
None |
# set_verbosity(level => 3);
public method Com::Vmware::Vapi::Util::Logger::SetChannelLength | ( | ) |
A public method to set number of character in a channel string.
Length | - Length of the channel |
None |
# SetChannelLength(Length => 10);
private method Com::Vmware::Vapi::Util::Logger::writeLog | ( | ) |
A private method to log messages to log file and the screen
MSG | - Message |
Type | - Message Type (Info, Warn...) |
Channel | - Channel Name |
None |
# writeLog(Channel => $args{Channel}, # MSG => $args{MSG}, # Type => "DEBUG");
private method Com::Vmware::Vapi::Util::Logger::writeToScreen | ( | ) |
A private method to write messages to the screen
Channel | - Channel Name |
Type | - Message Type |
TimeStamp | - TimeStamp details |
String | - Message String |
None |
# writeToScreen(Channel => $channel, TimeStamp => $timeStamp, # Type => $type, String => $string);