1 /* syslog_c.c -- call syslog for Go. 2 3 Copyright 2011 The Go Authors. All rights reserved. 4 Use of this source code is governed by a BSD-style 5 license that can be found in the LICENSE file. */ 6 7 #include <syslog.h> 8 9 #include "runtime.h" 10 11 /* We need to use a C function to call the syslog function, because we 12 can't represent a C varargs function in Go. */ 13 14 void syslog_c(intgo, const char*) 15 __asm__ (GOSYM_PREFIX "log..z2fsyslog.syslog_c"); 16 17 void syslog_c(intgo priority,const char * msg)18syslog_c (intgo priority, const char *msg) 19 { 20 syslog (priority, "%s", msg); 21 } 22