Files
mars-nwe/include/nwnss/include/nssLog.h
2026-06-16 15:31:38 +02:00

171 lines
4.8 KiB
C

/****************************************************************************
|
| (C) Copyright 2003 Novell, Inc.
| All Rights Reserved.
|
| This program is free software; you can redistribute it and/or
| modify it under the terms of version 2 of the GNU General Public
| License as published by the Free Software Foundation.
|
| This program is distributed in the hope that it will be useful,
| but WITHOUT ANY WARRANTY; without even the implied warranty of
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| GNU General Public License for more details.
|
| You should have received a copy of the GNU General Public License
| along with this program; if not, contact Novell, Inc.
|
| To contact Novell about this file by physical or electronic mail,
| you may find current contact information at www.novell.com
|
|***************************************************************************
|
| NSS Compression Management module
|
|---------------------------------------------------------------------------
|
| $Author: taysom $
| $Date: 2004-12-31 01:10:58 +0530 (Fri, 31 Dec 2004) $
|
| $RCSfile$
| $Revision: 465 $
|
|---------------------------------------------------------------------------
| Module Description:
|
+-------------------------------------------------------------------------*/
#ifndef _NSS_LOG_H_
#define _NSS_LOG_H_
#include <syslog.h>
#include "zError.h"
/* Should be feature related and not NLM related because
* the module is part of the generic log. NSSLOG_LAST
* must be the last number. Besure to update NSSLOG_TypeNames
* if you add another 'type'.
*/
#define NSSLOG_TYPE_UNKNOWN 0
#define NSSLOG_TYPE_NSS 1
#define NSSLOG_TYPE_ZLSS 2
#define NSSLOG_TYPE_ERRPRINTF 3
#define NSSLOG_TYPE_MSAP 4
#define NSSLOG_TYPE_MEDIA_UPGRADE 5
#define NSSLOG_TYPE_OWNERSHIP 6
#define NSSLOG_NUM_TYPENAMES 7
/* The name of the NSS log file. By using C: and not a full path
* the log will be placed into the default directory that NetWare
* was loaded from. Normally, this is the NWSERVER directory.
*/
#define NSSLOG_FILENAME MSGNot("C:NSS.LOG")
extern char *NSSLOG_TypeNames[];
#ifdef __linux__
#ifndef _MSGGEN_H_
typedef struct GeneralMsg_s GeneralMsg_s;
#endif
#ifndef _VOLUME_H_
typedef struct Pool_s Pool_s;
typedef struct Volume_s Volume_s;
#endif
#endif
STATUS NSSLOG_EventLog(
#if zNETWARE
struct LoadDefinitionStructure *moduleHandle,
#endif
#ifdef __linux__
void *moduleHandle,
#endif
const char *where,
NINT logLevel,
NINT typeNumber, /* Type; see NSSLOG_TYPE_... defines */
char *message ); /* strlen message + strlen type must be less than 384 characters */
STATUS NSSLOG_printf(
#if zNETWARE
struct LoadDefinitionStructure *moduleHandle,
#endif
#ifdef __linux__
void *moduleHandle,
#endif
const char *where,
NINT logLevel,
NINT typeNumber, /* Type; see NSSLOG_TYPE_... defines */
const char *format,
...);
void NSSLOG_Startup( );
void NSSLOG_Shutdown( );
STATUS NSSLOG_vprintf(
#if zNETWARE
struct LoadDefinitionStructure *moduleHandle,
#endif
const char *where,
NINT logLevel,
NINT typeNumber, /* Type; see NSSLOG_TYPE_... defines */
const char *format,
va_list args );
STATUS NSSLOG_EventLogWithVolume(
struct Volume_s *volume, /* VOlume must not be LATCHed by caller */
#if zNETWARE
struct LoadDefinitionStructure *moduleHandle,
#endif
#ifdef __linux__
void *moduleHandle,
#endif
const char *where,
NINT logLevel,
NINT typeNumber, /* Type; see NSSLOG_TYPE_... defines */
char *message ); /* strlen message + strlen type must be less than 384 characters */
STATUS NSSLOG_EventLogWithVolumeAndGenMsg(
struct Volume_s *volume,
struct GeneralMsg_s *errorToReport,
#if zNETWARE
struct LoadDefinitionStructure *moduleHandle,
#endif
#ifdef __linux__
void *moduleHandle,
#endif
const char *where,
NINT logLevel,
NINT typeNumber, /* Type; see NSSLOG_TYPE_... defines */
char *message ); /* strlen message + strlen type must be less than 384 characters */
STATUS NSSLOG_EventLogWithPoolAndGenMsg(
struct Pool_s *pool,
struct GeneralMsg_s *errorToReport,
#if zNETWARE
struct LoadDefinitionStructure *moduleHandle,
#endif
#ifdef __linux__
void *moduleHandle,
#endif
const char *where,
NINT logLevel,
NINT typeNumber, /* Type; see NSSLOG_TYPE_... defines */
char *message ); /* strlen message + strlen type must be less than 384 characters */
STATUS NSSLOG_EventLogWithPool(
struct Pool_s *pool,
#if zNETWARE
struct LoadDefinitionStructure *moduleHandle,
#endif
#ifdef __linux__
void *moduleHandle,
#endif
const char *where,
NINT logLevel,
NINT typeNumber, /* Type; see NSSLOG_TYPE_... defines */
char *message ); /* strlen message + strlen type must be less than 384 characters */
#endif /* _NSS_LOG_H_ */