Home | History | Annotate | Download | only in man3ha
 te
CDDL HEADER START

The contents of this file are subject to the terms of the
Common Development and Distribution License (the "License").
You may not use this file except in compliance with the License.

You can obtain a copy of the license at CDDL.txt
or http://www.opensolaris.org/os/licensing.
See the License for the specific language governing permissions
and limitations under the License.

When distributing Covered Code, include this CDDL HEADER in each
file and include the License file at CDDL.txt.
If applicable, add the following below this CDDL HEADER, with the
fields enclosed by brackets "[]" replaced with your own identifying
information: Portions Copyright [yyyy] [name of copyright owner]

CDDL HEADER END
Copyright 2007 Sun Microsystems, Inc. All rights
reserved. Use is subject to license terms.
scha_cluster_getlogfacility 3HA "7 Sep 2007" "Sun Cluster 3.2" "Sun Cluster HA and Data Services"
NAME
scha_cluster_getlogfacility - cluster log facility access
SYNOPSIS

cc [flags.\|.\|.] -I /usr/cluster/include file -L /usr/cluster/lib  -l  scha
#include <scha.h>

 scha_err_t scha_cluster_getlogfacility(int *logfacility);
DESCRIPTION

The scha_cluster_getlogfacility() function returns the system log facility number that is being used as the cluster log. The value is intended to be used with the Solaris syslog(3C) function by resource type implementations to record events and status messages to the cluster log.

The function returns an error status, and if successful, the facility number in the location pointed to by the logfacility argument.

RETURN VALUES

The scha_cluster_getlogfacility() function returns the following:

.na 0 .ad The function succeeded.

.na nonzero .ad The function failed.

ERRORS

.na SCHA_ERR_NOERR .ad The function succeeded.

See scha_calls(3HA) for a description of other error codes.

EXAMPLES

Example 1 Using the scha_cluster_getlogfacility() Function

main()
{
 scha_err_t err_code;
 int logfacility;

 err_code = scha_cluster_getlogfacility(&logfacility);

 if (err_code == SCHA_ERR_NOERR) {
 openlog("test resource", LOG_CONS, logfacility);
 syslog(LOG_INFO, "Access function call succeeded.");
 }
}
FILES

.na /usr/cluster/include/scha.h .ad Include file

.na /usr/cluster/lib/libscha.so .ad Library

ATTRIBUTES

See attributes(5) for descriptions of the following attributes:

ATTRIBUTE TYPEATTRIBUTE VALUE
AvailabilitySUNWscdev
Interface StabilityEvolving
SEE ALSO

syslog(3C), scha_calls(3HA), scha_cluster_get(3HA), scha_strerror(3HA), attributes(5)