Implements logging of error messages to standard error channel. See LogWriter.
LogWriter impl | Implements logging of error messages to standard error channel. |
Copyright | This program is free software. |
Files | |
C-kern/ | Header file of LogWriter. |
C-kern/ | Implementation file LogWriter impl. |
logwriter_chan_t | Extends logbuffer_t with isappend mode and log_state_e. |
lifetime | |
logwriter_chan_INIT | Static initializer. |
update | |
flush_logwriterchan | Flushes logbuffer_t in chan. |
logwriter_t | |
types | |
logwriter_it | |
static variables | |
s_logwriter_interface | Contains single instance of interface logwriter_it. |
initthread | |
helper | |
allocatebuffer_logwriter | Reserves some memory pages for internal buffer. |
freebuffer_logwriter | Frees internal buffer. |
lifetime | |
query | |
config | |
change | |
test |
This program is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
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.
© 2011 Jörg Seebohn
Header file of LogWriter.
Implementation file LogWriter impl.
struct logwriter_chan_t
Extends logbuffer_t with isappend mode and log_state_e. If isappend is true the next write to the buffer will be appended even if the buffer is full.
lifetime | |
logwriter_chan_INIT | Static initializer. |
update | |
flush_logwriterchan | Flushes logbuffer_t in chan. |
#define logwriter_chan_INIT( size, addr, io, logstate ) { logbuffer_INIT(size, addr, io), 0, logstate, false }
Static initializer.
size | Size of a temporary or static buffer. |
addr | Start address of the buffer. |
io | iochannel_t the buffer is written to. |
static void flush_logwriterchan( logwriter_chan_t * chan )
Flushes logbuffer_t in chan.
types | |
logwriter_it | |
static variables | |
s_logwriter_interface | Contains single instance of interface logwriter_it. |
initthread | |
helper | |
allocatebuffer_logwriter | Reserves some memory pages for internal buffer. |
freebuffer_logwriter | Frees internal buffer. |
lifetime | |
query | |
config | |
change | |
test |
log_it_DECLARE( logwriter_it, logwriter_t )
Defines interface for <logwriter_t> | see log_it_DECLARE. |
static logwriter_it s_logwriter_interface
Contains single instance of interface logwriter_it.
Extends logbuffer_t with isappend mode and log_state_e.
struct logwriter_chan_t
Static initializer.
#define logwriter_chan_INIT( size, addr, io, logstate ) { logbuffer_INIT(size, addr, io), 0, logstate, false }
Flushes logbuffer_t in chan.
static void flush_logwriterchan( logwriter_chan_t * chan )
log_it_DECLARE( logwriter_it, logwriter_t )
Contains single instance of interface logwriter_it.
static logwriter_it s_logwriter_interface
Reserves some memory pages for internal buffer.
static int allocatebuffer_logwriter( /*out*/memblock_t * buffer )
Frees internal buffer.
static int freebuffer_logwriter( memblock_t * buffer )
Describes an input/output channel like a file or network connection.
typedef sys_iochannel_t iochannel_t