4.0.0alpha.svn.7719
Amanda modules list
List of All Modules
All Amanda Releases

Amanda::Message

NAME

Amanda::Message - Amanda object use to return a message

Most API use or should be converted to use it.

SYNOPSIS

   # create a message
   my $msg = Amanda::Message->new(source_filename => __FILE__,
                                  source_line => __LINE__,
                                  severity    => $CRITICAL;
                                  code        => 1,
                                  message     => "This is a message",
                                  label       => $label);

   print $msg->message();

Message Objects

'source_filename' and 'source_line' are use for debuging to find where the message was generated.

The 'severity' of the message, the default is CRITICAL, it must be one of these predefined constants: CRITICAL ERROR WARNING MESSAGE INFO SUCCESS

The 'code' must be unique, it identify the message (0 to 3 are used for message not handled by Amanda::Message): 0 GOOD message 1 ERROR with a message 2 ERROR without a message 3 Amanda::Changer::Error #You should never create it 1000000 Amanda::Label message 1100000 Amanda::Changer::Message 1200000 Amanda::Recovery::Message 1300000 Amanda::Curinfo::Message 1400000 Amanda::Disklist::Message 1500000 Amanda::Config::Message 1600000 Amanda::Tapelist::Message 1700000 Amanda::Device::Message 1800000 Amanda::Status::Message 1900000 Amanda::Report::Message 2000000 Amanda::Amdump::Message 2100000 Amanda::Cmdfile::Message 2200000 Amanda::Amflush::Message 2400000 Amanda::Index::Message 2500000 Amanda::Amvault::Message 2600000 Amanda::DB::Message 2700000 Amanda::CheckDump::Message 2800000 amcheck 2900000 client service - senddiscover, restore, ... 3000000 Amanda::Amvmware::Message 3100000 Amanda::Service::Message 3101000 Amanda::Service::Restore::Message 3200000 Amanda::Appliance 3300000 Amanda::FetchDump::Message 3400000 Amanda::Cleanup::Message 3500000 Amanda::Process::Message 3600000 selfcheck 3700000 applications 3700000 amgtar 3701000 amstar 3702000 ambsdtar 3800000 Amanda::Extensions::Message 3801000 Amanda::Extensions::Rest::Application::Amvmware 3900000 planner 4000000 sendsize 4100000 dumper 4200000 sendbackup 4300000 Amanda::Chunker::Message 4400000 Amanda::Taper::Message 4500000 driver 4600000 client-util 4700000 scripts 4700000 script-email 4701000 amlog-script 4702000 amzfs-snapshot 4800000 Amanda::Extract::Message 4900000 Amanda::Restore::Message 5000000 ambackupd 5100000 Amanda::ScanInventory::Message 5200000 Amanda::Amcheck_Device::Message;

general keys: code => source_filename => source_line => message => 'default message' #optional

each code can have it's own set of keys: filename => errno => label => config => barcode => storage => pool => meta => dev_error =>

'message' is required only for code 0 and 1.

You must add all required fields to be able to rebuild the message string, this can include the label, config, barcode, errno, errorstr or any other fields.

Using as subclass

Each Amanda perl module should have an Amanda::Message subclass to describe all messages from the module.

eg. class Amanda::Label::Message is used by class Amanda::Label.

The subclass (Amanda::Label::Message) must overload the local_message method to return a string version of the message.

ABOUT THIS PAGE

This page was automatically generated Tue Mar 19 07:08:16 2019 from the Amanda source tree, and documents the most recent development version of Amanda. For documentation specific to the version of Amanda on your system, use the 'perldoc' command.


4.0.0alpha.svn.7719