Previous Page | Next Page

Function Reference

LOG4SAS_LOGEVENT Function



Logs a message by using a specific logger.
Category: Logging
Featured in: Logging Example Using Functions

Syntax
Arguments
Details
Name
See Also

Syntax

Log4SAS_logevent(name, level, message)


Arguments

"name"

specifies a name for the logger that processes the log event.

Requirement: The name must be enclosed in quotation marks.
"level"

specifies one of the following message levels:

TRACE

produces the most detailed information about your application. This level is primarily used by SAS Technical Support or development.

DEBUG

produces detailed information that you use to debug your application. This level is primarily used by SAS Technical Support or development.

INFO

provides information that highlights the progress of an application.

WARN

provides messages that identify potentially harmful situations.

ERROR

provides messages that might allow the application to continue running.

FATAL

provides messages that indicate that severe errors have occurred. These errors will probably cause the application to end.

Requirement: The level must be enclosed in quotation marks.
"message"

specifies the message that is logged.

Interaction: The only variables that the message can resolve are macro variables. DATA step variables do not resolve in the message.
Requirement: The message must be enclosed in quotation marks.

Details


Name

The log message name argument names a logger to process the log message.

A logger is an ancestor of another logger if the logger name, followed by a dot, is the prefix of the other logger. The following names are logger names:

Testing
Testing.MyProg
Testing.MyProg.TraceMsgs

Testing is the parent logger and the ancestor of the loggers MyProg and TraceMsgs. MyProg is the ancestor of the logger TraceMsgs. The logger Testing.MyProg.TraceMsgs provides a message category that can be used to log trace messages when you are testing the program MyProg.

The hierarchical organization of loggers enables loggers to inherit levels and appenders from their ancestors. For information about configuring loggers in a hierarchy, see Hierarchical Logger Names.


See Also

Functions:

LOG4SAS_APPENDER Function

LOG4SAS_LOGGER Function

Previous Page | Next Page | Top of Page