logging.h
来自「amygdata的神经网络算法源代码」· C头文件 代码 · 共 38 行
H
38 行
/*************************************************************************** logging.h - description ------------------- begin : Fri Nov 15 2002 copyright : (C) 2002 by R黡iger Koch email : rkoch@rkoch.org ***************************************************************************//*************************************************************************** * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * ***************************************************************************/#ifdef LOGLEVEL#include <iostream>/* * At compile time you can define one of 6 loglevels. The higher the loglevel * the more output will be produced * 1: An important event happend, such as changing the SpikeOutput object * 2. A less important event or a problem indicator, such as threads going to sleep * 3. A still less important event, such as incrementing simtime * 4. An event of little importance that doesn't happen too often such as firing of neurons * 5. Very little importance, such as receiving a spike * 6. Tracing local variables / lots of junk * * Usage example for level 4: * LOGGER(4, "neuron " << nId << " firing") */#define LOGGER(level, msg) if(level<=LOGLEVEL){ std::cout << "LOGLEVEL " << level << " " << __FILE__ << ":" << __LINE__ << " -- " << msg << std::endl; }#else#define LOGGER(level, msg)#endif
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?