|
ACF $AcfVersion:0$
|
Console logging component with colored output. More...
#include <CConsoleLogComp.h>
Public Types | |
| typedef CStreamLogCompBase | BaseClass |
Public Types inherited from ilog::CStreamLogCompBase | |
| typedef ilog::CLogCompBase | BaseClass |
| Base class typedef. | |
Public Types inherited from ilog::CLogCompBase | |
| typedef ilog::TMessageDelegatorComp< icomp::CComponentBase > | BaseClass |
| Base class typedef for component functionality. | |
| typedef QObject | BaseClass2 |
| Base class typedef for QObject functionality. | |
Protected Member Functions | |
| virtual void | WriteText (const QString &text, istd::IInformationProvider::InformationCategory category) override |
| Write a text line to the output stream. | |
Protected Member Functions inherited from ilog::CStreamLogCompBase | |
| virtual void | WriteMessageToStream (const istd::IInformationProvider &message) |
| Write formatted message to the output stream. | |
| virtual QString | GenerateMessageText (const istd::IInformationProvider &message) const |
| Generate formatted message text for the output. | |
| virtual void | WriteMessageToLog (const MessagePtr &messagePtr) override |
| Abstract method called to process a message. | |
| virtual void | OnComponentDestroyed () override |
Protected Member Functions inherited from icomp::CComponentBase | |
| bool | IsComponentActive () const |
| Check if component is active. | |
| virtual void | OnComponentCreated () |
| virtual const icomp::IRealComponentStaticInfo & | GetComponentStaticInfo () const =0 |
| Get access to static info of this component. | |
Additional Inherited Members | |
Signals inherited from ilog::CLogCompBase | |
| void | EmitAddMessage (const MessagePtr &messagePtr) |
| Signal emitted when a message is added. | |
Public Member Functions inherited from ilog::CStreamLogCompBase | |
| CStreamLogCompBase () | |
| istd::IInformationProvider::InformationCategory | GetWorseCategory () const |
| Get worse category (highest code) of all outputed messages. | |
| virtual bool | IsMessageSupported (int messageCategory=-1, int messageId=-1, const istd::IInformationProvider *messagePtr=NULL) const override |
| Check if a message is supported. | |
Public Member Functions inherited from ilog::CLogCompBase | |
| CLogCompBase () | |
| Default constructor. | |
| virtual void | AddMessage (const MessagePtr &messagePtr) override |
| Add a message to this log component. | |
Public Member Functions inherited from icomp::CComponentBase | |
| CComponentBase () | |
| Create component and assign it to specific context. | |
| virtual const icomp::IComponent * | GetParentComponent (bool ownerOnly=false) const override |
| Get parent of this component. | |
| virtual void * | GetInterface (const istd::CClassInfo &interfaceType, const QByteArray &subId="") override |
| Get access to specified component interface. | |
| virtual IComponentContextSharedPtr | GetComponentContext () const override |
| Get access to component context describing all application-specified component information loaded from components registry. | |
| virtual void | SetComponentContext (const IComponentContextSharedPtr &contextPtr, const icomp::IComponent *parentPtr, bool isParentOwner) override |
| Set component context of this component. | |
Public Member Functions inherited from istd::IPolymorphic | |
| virtual | ~IPolymorphic () |
Static Protected Member Functions inherited from icomp::CComponentBase | |
| static const icomp::IRealComponentStaticInfo & | InitStaticInfo (IComponent *componentPtr) |
| static QByteArray | GetComponentId (const icomp::IComponentContext *componentContextPtr, const QByteArray &contextId=QByteArray()) |
Console logging component with colored output.
CConsoleLogComp outputs log messages to the console (std::wcout) with platform-specific colored output based on message severity. This makes it easy to visually distinguish between info, warnings, and errors when running applications from the command line.
The component uses CStreamLogCompBase for message formatting and filtering, and adds color support for both Windows (via Windows console API) and Unix-like systems (via ANSI escape codes).
Definition at line 81 of file CConsoleLogComp.h.
Definition at line 84 of file CConsoleLogComp.h.
|
overrideprotectedvirtual |
Write a text line to the output stream.
Implements ilog::CStreamLogCompBase.