# # Copyright (c) 2001-2012 NetApp, Inc., All Rights Reserved # Any use, modification, or distribution is prohibited # without prior written consent from NetApp, Inc. # ## @summary JobLog componentState Module ## @author dl-nacl-dev@netapp.com ## @status shared ## @pod here =head1 NAME NACL::CS::JobLog =head1 DESCRIPTION B The "job log" commands have been replaced by "logger mgwd log" commands, so uage of this component is deprecated. Use L instead. =cut package NACL::CS::JobLog; use strict; use warnings; use Params::Validate qw(validate); use NACL::ComponentUtils qw(_dump_one); use NATE::Log qw(log_global); my $Log = log_global(); my $may_enter = $Log->may_enter(); my $may_exit = $Log->may_exit(); use NACL::ComponentUtils qw(_optional_scalars Dumper); use NACL::Exceptions::NoElementsFound qw(:try); use NACL::CS::LoggerMgwdLog; use base 'NACL::CS::ComponentState::ONTAP'; use Class::MethodMaker [ scalar => 'module', scalar => 'level', ]; sub fetch { $Log->enter() if $may_enter; my ($pkg, @args) = @_; $Log->warn("Since the 'job log' commands have been removed in ONTAP, " . 'usage of NACL::CS::JobLog is deprecated. Use ' . 'NACL::CS::LoggerMgwdLog->fetch() instead'); my @state_objs = NACL::CS::LoggerMgwdLog->fetch(@args); $Log->exit() if $may_exit; return wantarray ? @state_objs : $state_objs[0]; } 1;