Print this page
10805 Fix for 10687 can be improved


 505  * The default log level is L1.
 506  */
 507 #define SRPT_LOG_DEFAULT_LEVEL SRPT_LOG_L1
 508 
 509 extern uint_t srpt_errlevel;
 510 
 511 
 512 #define SRPT_DPRINTF_L0(...) cmn_err(CE_WARN, __VA_ARGS__)
 513 #define SRPT_DPRINTF_L1(...) cmn_err(CE_NOTE, __VA_ARGS__)
 514 #define SRPT_DPRINTF_L2(...)    if (srpt_errlevel >= SRPT_LOG_L2) { \
 515                                         cmn_err(CE_NOTE, __VA_ARGS__);\
 516                                 }
 517 #ifdef  DEBUG
 518 #define SRPT_DPRINTF_L3(...)    if (srpt_errlevel >= SRPT_LOG_L3) { \
 519                                         cmn_err(CE_NOTE, __VA_ARGS__);\
 520                                 }
 521 #define SRPT_DPRINTF_L4(...)    if (srpt_errlevel >= SRPT_LOG_L4) { \
 522                                         cmn_err(CE_NOTE, __VA_ARGS__);\
 523                                 }
 524 #else
 525 #define SRPT_DPRINTF_L3(...)
 526 #define SRPT_DPRINTF_L4(...)
 527 #endif
 528 
 529 #ifdef __cplusplus
 530 }
 531 #endif
 532 
 533 #endif /* _SRPT_IMPL_H_ */


 505  * The default log level is L1.
 506  */
 507 #define SRPT_LOG_DEFAULT_LEVEL SRPT_LOG_L1
 508 
 509 extern uint_t srpt_errlevel;
 510 
 511 
 512 #define SRPT_DPRINTF_L0(...) cmn_err(CE_WARN, __VA_ARGS__)
 513 #define SRPT_DPRINTF_L1(...) cmn_err(CE_NOTE, __VA_ARGS__)
 514 #define SRPT_DPRINTF_L2(...)    if (srpt_errlevel >= SRPT_LOG_L2) { \
 515                                         cmn_err(CE_NOTE, __VA_ARGS__);\
 516                                 }
 517 #ifdef  DEBUG
 518 #define SRPT_DPRINTF_L3(...)    if (srpt_errlevel >= SRPT_LOG_L3) { \
 519                                         cmn_err(CE_NOTE, __VA_ARGS__);\
 520                                 }
 521 #define SRPT_DPRINTF_L4(...)    if (srpt_errlevel >= SRPT_LOG_L4) { \
 522                                         cmn_err(CE_NOTE, __VA_ARGS__);\
 523                                 }
 524 #else
 525 #define SRPT_DPRINTF_L3(...) (void)(0)
 526 #define SRPT_DPRINTF_L4(...) (void)(0)
 527 #endif
 528 
 529 #ifdef __cplusplus
 530 }
 531 #endif
 532 
 533 #endif /* _SRPT_IMPL_H_ */