A Discrete-Event Network Simulator
API
log-macros-disabled.h
Go to the documentation of this file.
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2 /*
3  * Copyright (c) 2014 Andrey Mazo
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License version 2 as
7  * published by the Free Software Foundation;
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  * Author: Andrey Mazo <ahippo@yandex.com>
19  */
20 
28 #ifndef NS3_LOG_MACROS_DISABLED_H
29 #define NS3_LOG_MACROS_DISABLED_H
30 
31 #ifndef NS3_LOG_ENABLE
32 
37 #define NS_LOG_NOOP_INTERNAL(msg) \
38  do \
39  { \
40  if (false) \
41  { \
42  std::clog << msg; \
43  } \
44  } \
45  while (false)
46 
47 #define NS_LOG(level, msg) \
48  NS_LOG_NOOP_INTERNAL (msg)
49 
50 #define NS_LOG_FUNCTION_NOARGS()
51 
52 #define NS_LOG_FUNCTION(parameters) \
53  NS_LOG_NOOP_INTERNAL (parameters)
54 
55 #define NS_LOG_UNCOND(msg) \
56  NS_LOG_NOOP_INTERNAL (msg)
57 
58 
59 #endif /* !NS3_LOG_ENABLE */
60 
61 #endif /* NS3_LOG_MACROS_DISABLED_H */