star-camera

Camera models
git clone git://git.meso-star.fr/star-camera.git
Log | Files | Refs | README | LICENSE

scam_log.h (1886B)


      1 /* Copyright (C) 2021-2023 |Méso|Star> (contact@meso-star.com)
      2  *
      3  * This program is free software: you can redistribute it and/or modify
      4  * it under the terms of the GNU General Public License as published by
      5  * the Free Software Foundation, either version 3 of the License, or
      6  * (at your option) any later version.
      7  *
      8  * This program is distributed in the hope that it will be useful,
      9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
     11  * GNU General Public License for more details.
     12  *
     13  * You should have received a copy of the GNU General Public License
     14  * along with this program. If not, see <http://www.gnu.org/licenses/>. */
     15 
     16 #ifndef SCAM_LOG_H
     17 #define SCAM_LOG_H
     18 
     19 #include <rsys/rsys.h>
     20 
     21 #define MSG_INFO_PREFIX "Star-Camera:\x1b[1m\x1b[32minfo\x1b[0m: "
     22 #define MSG_ERROR_PREFIX "Star-Camera:\x1b[1m\x1b[31merror\x1b[0m: "
     23 #define MSG_WARNING_PREFIX "Star-Camera:\x1b[1m\x1b[33mwarning\x1b[0m: "
     24 
     25 extern LOCAL_SYM res_T
     26 setup_log_default
     27   (struct scam* cam);
     28 
     29 /* Conditionally log a message on the LOG_OUTPUT stream of the atrstm logger,
     30  * with respect to its verbose flag */
     31 extern LOCAL_SYM void
     32 log_info
     33   (const struct scam* cam,
     34    const char* msg,
     35    ...)
     36 #ifdef COMPILER_GCC
     37   __attribute((format(printf, 2, 3)))
     38 #endif
     39 ;
     40 
     41 /* Conditionally log a message on the LOG_ERROR stream of the scam logger,
     42  * with respect to its verbose flag */
     43 extern LOCAL_SYM void
     44 log_err
     45   (const struct scam* cam,
     46    const char* msg,
     47    ...)
     48 #ifdef COMPILER_GCC
     49   __attribute((format(printf, 2, 3)))
     50 #endif
     51 ;
     52 
     53 /* Conditionally log a message on the LOG_WARNING stream of the scam logger,
     54  * with respect to its verbose flag */
     55 extern LOCAL_SYM void
     56 log_warn
     57   (const struct scam* cam,
     58    const char* msg,
     59    ...)
     60 #ifdef COMPILER_GCC
     61     __attribute((format(printf, 2, 3)))
     62 #endif
     63 ;
     64 
     65 #endif /* SCAM_LOG_H */