]> git.proxmox.com Git - mirror_ovs.git/blame - lib/syslog-null.c
netdev-offload-tc: Use single 'once' variable for probing tc features
[mirror_ovs.git] / lib / syslog-null.c
CommitLineData
e11f0c25
BP
1/*
2 * Copyright (c) 2015, 2016 Nicira, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at:
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#include "syslog-null.h"
17
18#include <config.h>
19
20#include "compiler.h"
21#include "syslog-provider.h"
22#include "util.h"
23
24static void syslog_null_open(struct syslogger *this, int facility);
25static void syslog_null_log(struct syslogger *this, int pri, const char *msg);
26
27static struct syslog_class syslog_null_class = {
28 syslog_null_open,
29 syslog_null_log,
30};
31
32struct syslog_null {
33 struct syslogger parent;
34};
35
36/* This function creates object that delegate all logging to null's
37 * syslog implementation. */
38struct syslogger *
39syslog_null_create(void)
40{
41 struct syslog_null *this = xmalloc(sizeof *this);
42
43 this->parent.class = &syslog_null_class;
44 this->parent.prefix = "";
45
46 return &this->parent;
47}
48
49static void
50syslog_null_open(struct syslogger *this OVS_UNUSED, int facility OVS_UNUSED)
51{
52 /* Nothing to do. */
53}
54
55static void
56syslog_null_log(struct syslogger *this OVS_UNUSED, int pri OVS_UNUSED,
57 const char *msg OVS_UNUSED)
58{
59 /* Nothing to do. */
60}