Torc  0.1
Public Slots | Signals | Public Member Functions | Properties | List of all members
WebLogger Class Reference

Serves log content to registered subscribers and HTTP clients. More...

#include <torcloggingimp.h>

Inheritance diagram for WebLogger:
[legend]

Public Slots

bool event (QEvent *event) override
 
void SubscriberDeleted (QObject *Subscriber)
 
QByteArray GetLog (void)
 
QByteArray GetTail (void)
 

Signals

void logChanged (void)
 
void tailChanged (void)
 

Public Member Functions

 WebLogger (const QString &Filename)
 
 ~WebLogger ()=default
 
bool Logmsg (LogItem *Item) override
 
- Public Member Functions inherited from TorcHTTPService
 TorcHTTPService (QObject *Parent, const QString &Signature, const QString &Name, const QMetaObject &MetaObject, const QString &Blacklist=QStringLiteral(""))
 
virtual ~TorcHTTPService ()
 
void ProcessHTTPRequest (const QString &PeerAddress, int PeerPort, const QString &LocalAddress, int LocalPort, TorcHTTPRequest &Request) override
 
QVariantMap ProcessRequest (const QString &Method, const QVariant &Parameters, QObject *Connection, bool Authenticated) override
 
QString GetMethod (int Index)
 
QVariant GetProperty (int Index)
 Get the value of a given property. More...
 
QVariantMap GetServiceDetails (void)
 Return a QVariantMap describing the services methods and properties. More...
 
virtual QString GetUIName (void)
 
virtual QString GetPresentationURL (void)
 
- Public Member Functions inherited from TorcHTTPHandler
 TorcHTTPHandler (const QString &Signature, const QString &Name)
 
virtual ~TorcHTTPHandler ()
 
QString Signature (void) const
 
bool GetRecursive (void) const
 
QString Name (void) const
 
- Public Member Functions inherited from FileLogger
 FileLogger (const QString &Filename, bool ErrorsOnly, int Quiet)
 
 ~FileLogger ()
 
- Public Member Functions inherited from LoggerBase
 LoggerBase (const QString &FileName)
 
virtual ~LoggerBase ()=default
 

Properties

QByteArray log
 
QByteArray tail
 

Additional Inherited Members

- Protected Member Functions inherited from TorcHTTPService
void HandleSubscriberDeleted (QObject *Subscriber)
 
- Protected Member Functions inherited from FileLogger
bool PrintLine (QByteArray &Line) override
 
- Protected Member Functions inherited from LoggerBase
QByteArray GetLine (LogItem *Item)
 
- Static Protected Member Functions inherited from TorcHTTPHandler
static bool MethodIsAuthorised (TorcHTTPRequest &Request, int Allowed)
 Check the current request is authorised and set the authentication header if not. More...
 
static void HandleOptions (TorcHTTPRequest &Request, int Allowed)
 
static void HandleFile (TorcHTTPRequest &Request, const QString &Filename, int Cache)
 
- Protected Attributes inherited from TorcHTTPService
QReadWriteLock m_httpServiceLock
 
- Protected Attributes inherited from TorcHTTPHandler
QString m_signature
 
bool m_recursive
 
QString m_name
 
- Protected Attributes inherited from FileLogger
bool m_opened
 
QFile m_file
 
bool m_errorsOnly
 
int m_quiet
 
- Protected Attributes inherited from LoggerBase
QString m_fileName
 

Detailed Description

Serves log content to registered subscribers and HTTP clients.

The latest, complete log can be downloaded via GetLog. Notifications of updates to the log are sent every 10 seconds.

Note
Subscribers to the 'tail' may not receive all log items if they do not retrieve the latest tail before the next item is logged.

Definition at line 77 of file torcloggingimp.h.

Constructor & Destructor Documentation

WebLogger::WebLogger ( const QString &  Filename)
explicit

Definition at line 459 of file torcloggingimp.cpp.

WebLogger::~WebLogger ( )
default

Member Function Documentation

bool WebLogger::event ( QEvent *  event)
overrideslot

Definition at line 471 of file torcloggingimp.cpp.

QByteArray WebLogger::GetLog ( void  )
slot

Definition at line 495 of file torcloggingimp.cpp.

QByteArray WebLogger::GetTail ( void  )
slot

Definition at line 505 of file torcloggingimp.cpp.

void WebLogger::logChanged ( void  )
signal
bool WebLogger::Logmsg ( LogItem Item)
overridevirtual

Reimplemented from FileLogger.

Definition at line 511 of file torcloggingimp.cpp.

void WebLogger::SubscriberDeleted ( QObject *  Subscriber)
slot

Definition at line 490 of file torcloggingimp.cpp.

void WebLogger::tailChanged ( void  )
signal

Property Documentation

QByteArray WebLogger::log
read

Definition at line 83 of file torcloggingimp.h.

QByteArray WebLogger::tail
read

Definition at line 84 of file torcloggingimp.h.


The documentation for this class was generated from the following files: