Open Model Railroad Network (OpenMRN)
Loading...
Searching...
No Matches
TcpLogging.hxx File Reference

Go to the source code of this file.

Classes

struct  LogEntry
 Buffer content structure for sending log entries. More...
 
class  FdLoggingServer
 Base class that can receive log buffers from the FdLogging implementation and prints them to a file descriptor. More...
 
class  TcpLoggingServer
 Implementation of the logging proxy that listens on a TCP port, waits for the first incoming connection, and outputs all log lines after that connection to the given TCP socket. More...
 
class  SerialLoggingServer
 Implementation of the logging proxy that outputs all logs to a serial port. More...
 

Typedefs

using FdLoggingServerBase = StateFlow< Buffer< LogEntry >, QList< 1 > >
 Base class for declaring the flow type of the FdLoggingServer.
 

Functions

void log_output (char *buf, int size)
 Implementation of the weak symbol to output log lines.
 

Detailed Description

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

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 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.

Log target that accepts a TCP connection and prints the log information to the clients.

Author
Balazs Racz
Date
3 Sep 2016

Definition in file TcpLogging.hxx.

Typedef Documentation

◆ FdLoggingServerBase

Base class for declaring the flow type of the FdLoggingServer.

Definition at line 51 of file TcpLogging.hxx.

Function Documentation

◆ log_output()

void log_output ( char *  buf,
int  size 
)

Implementation of the weak symbol to output log lines.

Prints a line of log to the log output destination.

This is a definition fo a C++ symbol, and should be included exactly once into one .cxx file; typicall into main.cxx.

Parameters
bufpointer to bytes to log. Does not contain a
.
sizehow may bytes to log.

Definition at line 114 of file TcpLogging.hxx.