no-OS
Macros
print_log.h File Reference

Print messages helpers. More...

#include <stdio.h>
Include dependency graph for print_log.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define LOG_EMERG   0x0
 
#define LOG_ALERT   0x1
 
#define LOG_CRIT   0x2
 
#define LOG_ERR   0x3
 
#define LOG_WARNING   0x4
 
#define LOG_NOTICE   0x5
 
#define LOG_INFO   0x6
 
#define LOG_DEBUG   0x7
 
#define LOG_LEVEL   LOG_INFO
 
#define pr_emerg(fmt, args...)
 
#define pr_alert(fmt, args...)
 
#define pr_crit(fmt, args...)
 
#define pr_err(fmt, args...)
 
#define pr_warning(fmt, args...)   printf("WARNING: " fmt, ##args)
 
#define pr_notice(fmt, args...)   printf("NOTICE: " fmt, ##args)
 
#define pr_info(fmt, args...)   printf(fmt, ##args)
 
#define pr_debug(fmt, args...)
 

Detailed Description

Print messages helpers.

Author
Antoniu Miclaus (anton.nosp@m.iu.m.nosp@m.iclau.nosp@m.s@an.nosp@m.alog..nosp@m.com)

Copyright 2020(c) Analog Devices, Inc.

All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ LOG_ALERT

#define LOG_ALERT   0x1

◆ LOG_CRIT

#define LOG_CRIT   0x2

◆ LOG_DEBUG

#define LOG_DEBUG   0x7

◆ LOG_EMERG

#define LOG_EMERG   0x0

◆ LOG_ERR

#define LOG_ERR   0x3

◆ LOG_INFO

#define LOG_INFO   0x6

◆ LOG_LEVEL

#define LOG_LEVEL   LOG_INFO

◆ LOG_NOTICE

#define LOG_NOTICE   0x5

◆ LOG_WARNING

#define LOG_WARNING   0x4

◆ pr_alert

#define pr_alert (   fmt,
  args... 
)
Value:
printf("ALERT: %s:%d:%s(): " \
fmt, __FILE__, __LINE__, __func__, ##args)

◆ pr_crit

#define pr_crit (   fmt,
  args... 
)
Value:
printf("CRIT: %s:%d:%s(): " \
fmt, __FILE__, __LINE__, __func__, ##args)

◆ pr_debug

#define pr_debug (   fmt,
  args... 
)

◆ pr_emerg

#define pr_emerg (   fmt,
  args... 
)
Value:
printf("EMERG: %s:%d:%s(): " \
fmt, __FILE__, __LINE__, __func__, ##args)

◆ pr_err

#define pr_err (   fmt,
  args... 
)
Value:
printf("ERR: %s:%d:%s(): " \
fmt, __FILE__, __LINE__, __func__, ##args)

◆ pr_info

#define pr_info (   fmt,
  args... 
)    printf(fmt, ##args)

◆ pr_notice

#define pr_notice (   fmt,
  args... 
)    printf("NOTICE: " fmt, ##args)

◆ pr_warning

#define pr_warning (   fmt,
  args... 
)    printf("WARNING: " fmt, ##args)