scif_sas_logger.h revision 230557
1275988Sngie/*- 2240116Smarcel * This file is provided under a dual BSD/GPLv2 license. When using or 3240116Smarcel * redistributing this file, you may do so under either license. 4240116Smarcel * 5240116Smarcel * GPL LICENSE SUMMARY 6240116Smarcel * 7240116Smarcel * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 8240116Smarcel * 9240116Smarcel * This program is free software; you can redistribute it and/or modify 10240116Smarcel * it under the terms of version 2 of the GNU General Public License as 11240116Smarcel * published by the Free Software Foundation. 12240116Smarcel * 13240116Smarcel * This program is distributed in the hope that it will be useful, but 14240116Smarcel * WITHOUT ANY WARRANTY; without even the implied warranty of 15240116Smarcel * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16240116Smarcel * General Public License for more details. 17240116Smarcel * 18240116Smarcel * You should have received a copy of the GNU General Public License 19240116Smarcel * along with this program; if not, write to the Free Software 20240116Smarcel * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 21240116Smarcel * The full GNU General Public License is included in this distribution 22240116Smarcel * in the file called LICENSE.GPL. 23240116Smarcel * 24275988Sngie * BSD LICENSE 25240116Smarcel * 26275988Sngie * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 27275988Sngie * All rights reserved. 28260029Sjmmv * 29260029Sjmmv * Redistribution and use in source and binary forms, with or without 30260029Sjmmv * modification, are permitted provided that the following conditions 31260029Sjmmv * are met: 32260029Sjmmv * 33260029Sjmmv * * Redistributions of source code must retain the above copyright 34240116Smarcel * notice, this list of conditions and the following disclaimer. 35240116Smarcel * * Redistributions in binary form must reproduce the above copyright 36260029Sjmmv * notice, this list of conditions and the following disclaimer in 37240116Smarcel * the documentation and/or other materials provided with the 38240116Smarcel * distribution. 39240116Smarcel * 40275988Sngie * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 41275988Sngie * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 42240116Smarcel * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 43260029Sjmmv * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 44260029Sjmmv * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45260029Sjmmv * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 46260029Sjmmv * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 47260029Sjmmv * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 48260029Sjmmv * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 49260029Sjmmv * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 50260029Sjmmv * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51260029Sjmmv * 52260029Sjmmv * $FreeBSD$ 53260029Sjmmv */ 54260029Sjmmv#ifndef _SCIF_SAS_LOGGER_H_ 55260029Sjmmv#define _SCIF_SAS_LOGGER_H_ 56260029Sjmmv 57240116Smarcel/** 58260029Sjmmv * @file 59260029Sjmmv * 60260029Sjmmv * @brief This file contains all of the SCI SAS Framework specific logger 61260029Sjmmv * object methods. 62260029Sjmmv */ 63260029Sjmmv 64260029Sjmmv#ifdef __cplusplus 65260029Sjmmvextern "C" { 66260029Sjmmv#endif // __cplusplus 67260029Sjmmv 68260029Sjmmv#include <dev/isci/scil/scif_logger.h> 69260029Sjmmv#include <dev/isci/scil/scif_user_callback.h> 70260029Sjmmv 71260029Sjmmv#if defined (SCI_LOGGING) 72260029Sjmmv 73260029Sjmmv#define SCIF_LOG_ERROR(x) scif_cb_logger_log_error x 74260029Sjmmv#define SCIF_LOG_WARNING(x) scif_cb_logger_log_warning x 75260029Sjmmv#define SCIF_LOG_INFO(x) scif_cb_logger_log_info x 76260029Sjmmv#define SCIF_LOG_TRACE(x) scif_cb_logger_log_trace x 77260029Sjmmv#define SCIF_LOG_STATES(x) scif_cb_logger_log_states x 78260029Sjmmv 79260029Sjmmv#else // defined (SCI_LOGGING) 80260029Sjmmv 81260029Sjmmv#define SCIF_LOG_ERROR(x) 82260029Sjmmv#define SCIF_LOG_WARNING(x) 83260029Sjmmv#define SCIF_LOG_INFO(x) 84260029Sjmmv#define SCIF_LOG_TRACE(x) 85260029Sjmmv#define SCIF_LOG_STATES(x) 86260029Sjmmv 87260029Sjmmv#endif // defined (SCI_LOGGING) 88260029Sjmmv 89260029Sjmmv#ifdef __cplusplus 90260029Sjmmv} 91260029Sjmmv#endif // __cplusplus 92260029Sjmmv 93260029Sjmmv#endif // _SCIF_SAS_LOGGER_H_ 94260029Sjmmv 95260029Sjmmv