usb_moded  0.86.0+mer57
Functions
usb_moded-log.c File Reference
#include "usb_moded-log.h"
#include <sys/time.h>
#include <stdio.h>
#include <errno.h>

Go to the source code of this file.

Functions

void log_emit_va (const char *file, const char *func, int line, int lev, const char *fmt, va_list va)
 
void log_emit_real (const char *file, const char *func, int line, int lev, const char *fmt,...)
 
int log_get_level (void)
 
void log_set_level (int lev)
 
bool log_p (int lev)
 
int log_get_type (void)
 
const char * log_get_name (void)
 
void log_set_name (const char *name)
 
void log_set_lineinfo (bool lineinfo)
 
bool log_get_lineinfo (void)
 
void log_init (void)
 

Detailed Description

Copyright (c) 2010 Nokia Corporation. All rights reserved. Copyright (c) 2016 - 2021 Jolla Ltd. Copyright (c) 2020 Open Mobile Platform LLC.

Author
Philippe De Swert phili.nosp@m.ppe..nosp@m.de-sw.nosp@m.ert@.nosp@m.nokia.nosp@m..com
Simo Piiroinen simo..nosp@m.piir.nosp@m.oinen.nosp@m.@nok.nosp@m.ia.co.nosp@m.m
Philippe De Swert phdes.nosp@m.wer@.nosp@m.lumi..nosp@m.maa
Philippe De Swert phili.nosp@m.pped.nosp@m.eswer.nosp@m.t@gm.nosp@m.ail.c.nosp@m.om
Simo Piiroinen simo..nosp@m.piir.nosp@m.oinen.nosp@m.@jol.nosp@m.lamob.nosp@m.ile..nosp@m.com

This program is free software; you can redistribute it and/or modify it under the terms of the Lesser GNU General Public License version 2 as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the Lesser GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

Definition in file usb_moded-log.c.

Function Documentation

◆ log_emit_real()

void log_emit_real ( const char *  file,
const char *  func,
int  line,
int  lev,
const char *  fmt,
  ... 
)

Print the logged messages to the selected output

Parameters
fileSource file name
funcFunction name
lineLine in source file
levThe wanted log level
fmtThe message format string
...Arguments for the format string

Definition at line 303 of file usb_moded-log.c.

◆ log_emit_va()

void log_emit_va ( const char *  file,
const char *  func,
int  line,
int  lev,
const char *  fmt,
va_list  va 
)

Print the logged messages to the selected output

Parameters
fileSource file name
funcFunction name
lineLine in source file
levThe wanted log level
fmtThe message format string
vaArguments for the format string

Definition at line 210 of file usb_moded-log.c.

◆ log_get_level()

int log_get_level ( void  )

Get the currently set logging level

Returns
The current logging level

Definition at line 327 of file usb_moded-log.c.

◆ log_get_lineinfo()

bool log_get_lineinfo ( void  )

Test if line info should be included in logging

Returns
true when line info should be emitted, false otherwise

Definition at line 401 of file usb_moded-log.c.

◆ log_get_name()

const char * log_get_name ( void  )

Get the currently set logging name

Returns
The current logging name

Definition at line 374 of file usb_moded-log.c.

◆ log_get_type()

int log_get_type ( void  )

Get the currently set logging type

Returns
The current logging type

Definition at line 356 of file usb_moded-log.c.

◆ log_init()

void log_init ( void  )

Initialize logging

Definition at line 407 of file usb_moded-log.c.

◆ log_p()

bool log_p ( int  lev)

Test if logging should be done at given level

Parameters
levThe logging level to query
Returns
true if logging in the given level is allowed, false otherwise

Definition at line 347 of file usb_moded-log.c.

◆ log_set_level()

void log_set_level ( int  lev)

Set the logging level

Parameters
levThe wanted logging level

Definition at line 336 of file usb_moded-log.c.

◆ log_set_lineinfo()

void log_set_lineinfo ( bool  lineinfo)

Enable/disable the logging line info

Parameters
lineinfotrue to enable line info, false to disable

Definition at line 392 of file usb_moded-log.c.

◆ log_set_name()

void log_set_name ( const char *  name)

Set the logging name

Parameters
nameThe wanted logging name

Definition at line 383 of file usb_moded-log.c.