The macro does not directly manipulate SAS datasets. It processes character strings (logger name and message) provided as parameters. These strings are then passed to the `log4sas_logevent` function for logging. There is no dependency on external data or standard SAS libraries like SASHELP for its intrinsic operation.
1 Code Block
MACRO
Explanation : This block contains the definition of the `_issueDebugMessage` macro. It starts with checks for the presence of the `loggername` and `message` parameters. If a parameter is missing, a `%put` warning is issued, and the macro terminates. If the parameters are valid, the `%sysfunc(log4sas_logevent(...))` function is called to write the debug message to the specified logger. The return code of this function is stored in `_rc` and checked to detect any logging errors.
Copied!
/**
\file
\ingroup SASUNIT_LOG4SAS
\brief Issues an debug message to a logger
\version \$Revision$
\author \$Author$
\date \$Date$
\copyright Copyright 2010-2023 HMS Analytical Software GmbH, http://www.analytical-software.de
This file is part of SASUnit, the Unit testing framework for SAS(R) programs.
For copyright information and terms of usage under the GNU Lesser General Public License see included file README.md
or https://github.com/HMS-Analytical-Software/SASUnit/wiki/readme/.
\param loggername Name of the logger to capture the message
\param message Message to be captured by the logger
\return message Message in the associated appender
*//** \cond */
%macro _issueDebugMessage(loggername, message);
%if (%length(&loggername.)=0) %then %do;
%put WARNING: loggername is null;
%return;
%end;
%if (%length(&message.)=0) %then %do;
%put WARNING: message is null;
%return;
%end;
%let _rc = %sysfunc(log4sas_logevent(&loggername., Debug, DEBUG: &message.));
%if (&_rc ne 0) %then %do;
%put ERROR: _rc is NOT null: &_rc.;
%end;
%mend _issueDebugMessage;
/** \endcond */
1
/**
2
\file
3
\ingroup SASUNIT_LOG4SAS
4
5
\brief Issues an debug message to a logger
6
7
\version \$Revision$
8
\author \$Author$
9
\date \$Date$
10
11
\copyright Copyright 2010-2023 HMS Analytical Software GmbH, http://www.analytical-software.de
12
This file is part of SASUnit, the Unit testing framework for SAS(R) programs.
13
For copyright information and terms of usage under the GNU Lesser General Public License see included file README.md
14
or https://github.com/HMS-Analytical-Software/SASUnit/wiki/readme/.
15
16
\param loggername Name of the logger to capture the message
17
\param message Message to be captured by the logger
This material is provided "as is" by We Are Cas. There are no warranties, expressed or implied, as to merchantability or fitness for a particular purpose regarding the materials or code contained herein. We Are Cas is not responsible for errors in this material as it now exists or will exist, nor does We Are Cas provide technical support for it.
Copyright Info : Copyright 2010-2023 HMS Analytical Software GmbH, http://www.analytical-software.de This file is part of SASUnit, the Unit testing framework for SAS(R) programs. For copyright information and terms of usage under the GNU Lesser General Public License see included file README.md or https://github.com/HMS-Analytical-Software/SASUnit/wiki/readme/.
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration. WeAreCAS is an independent community site and is not affiliated with SAS Institute Inc.
This site uses technical and analytical cookies to improve your experience.
Read more.