2011-03-09 23:13:09 +01:00
|
|
|
/* syslog_c.c -- call syslog for Go.
|
|
|
|
|
|
|
|
Copyright 2011 The Go Authors. All rights reserved.
|
|
|
|
Use of this source code is governed by a BSD-style
|
|
|
|
license that can be found in the LICENSE file. */
|
|
|
|
|
|
|
|
#include <syslog.h>
|
|
|
|
|
2012-11-06 19:28:21 +01:00
|
|
|
#include "runtime.h"
|
|
|
|
|
2011-03-09 23:13:09 +01:00
|
|
|
/* We need to use a C function to call the syslog function, because we
|
|
|
|
can't represent a C varargs function in Go. */
|
|
|
|
|
2012-11-06 19:28:21 +01:00
|
|
|
void syslog_c(intgo, const char*)
|
2013-01-24 20:44:23 +01:00
|
|
|
__asm__ (GOSYM_PREFIX "log_syslog.syslog_c");
|
2011-03-09 23:13:09 +01:00
|
|
|
|
|
|
|
void
|
2012-11-06 19:28:21 +01:00
|
|
|
syslog_c (intgo priority, const char *msg)
|
2011-03-09 23:13:09 +01:00
|
|
|
{
|
|
|
|
syslog (priority, "%s", msg);
|
|
|
|
}
|