smbd_syslog.c revision b819cea2f73f98c5662230cc9affc8cc84f77fcf
/*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied this
* source. A copy of the CDDL is also available via the Internet at
*/
/*
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
*/
#include <stdio.h>
#include <stdarg.h>
#include <errno.h>
#include <string.h>
#include <syslog.h>
#include <smbsrv/smb_ioctl.h>
#include "smbd.h"
"emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"
};
static void
{
char fbuf[SMBD_LOG_MSGSIZE];
char *newfmt;
int save_errno = errno;
pri &= LOG_PRIMASK;
return;
/* NB: cbuf has \n */
}
/* LINTED E_SEC_PRINTF_VAR_FMT */
}
/*
* Provide a replacement for libsmb:smb_vsyslog() that prints messages
* both to the normal sysloc(3c), and to stdout, which ends up in:
* /var/svc/log/network-smb-server:default.log
* It's much easier to follow debug messages in the service log.
*/
void
{
}
/*
* An override for libsmb:smb_trace(). As the comment there says:
*
* This function is designed to be used with dtrace, i.e. see:
*
* Outside of dtrace, the messages passed to this function usually
* lack sufficient context to be useful, so don't log them.
* However, if you insist, set debug >= 3 and this will log them.
*/
void
smb_trace(const char *s)
{
}