paludis  Version 2.6.0
Public Member Functions | List of all members
paludis::OutputManager Class Referenceabstract
+ Inheritance diagram for paludis::OutputManager:

Public Member Functions

 OutputManager (const OutputManager &)=delete
 
OutputManageroperator= (const OutputManager &)=delete
 
virtual std::ostream & stdout_stream () PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual std::ostream & stderr_stream () PALUDIS_ATTRIBUTE((warn_unused_result))=0
 
virtual void message (const MessageType, const std::string &)=0
 
virtual void flush ()=0
 
virtual bool want_to_flush () const =0
 
virtual void succeeded ()=0
 
virtual void ignore_succeeded ()=0
 
virtual void nothing_more_to_come ()=0
 

Member Function Documentation

virtual void paludis::OutputManager::flush ( )
pure virtual

Clients may call this method every few seconds when running multiple processes.

This is used to display ongoing buffered messages without mixing output from multiple processes.

Implemented in paludis::FormatMessagesOutputManager, paludis::CommandOutputManager, paludis::TeeOutputManager, paludis::IPCOutputManager, paludis::FileOutputManager, paludis::ForwardAtFinishOutputManager, paludis::BufferOutputManager, and paludis::StandardOutputManager.

virtual void paludis::OutputManager::ignore_succeeded ( )
pure virtual

Instructs the output manager to ignore future calls to succeeded().

Typically this is used to force log files to be kept even if an error has occurred, if the error does not trigger the usual failure mechanisms.

Since
0.59

Implemented in paludis::FormatMessagesOutputManager, paludis::CommandOutputManager, paludis::TeeOutputManager, paludis::IPCOutputManager, paludis::FileOutputManager, paludis::ForwardAtFinishOutputManager, paludis::BufferOutputManager, and paludis::StandardOutputManager.

virtual void paludis::OutputManager::message ( const MessageType  ,
const std::string &   
)
pure virtual

An out of band message that might want to be logged or handled in a special way.

The caller must still also display the message to stdout_stream() as appropriate.

Implemented in paludis::FormatMessagesOutputManager, paludis::CommandOutputManager, paludis::TeeOutputManager, paludis::IPCOutputManager, paludis::FileOutputManager, paludis::ForwardAtFinishOutputManager, paludis::BufferOutputManager, and paludis::StandardOutputManager.

virtual void paludis::OutputManager::nothing_more_to_come ( )
pure virtual

May be called to indicate that no further output or messages will occur, allowing for files to be closed off etc.

Summary messages are shown when the output manager is destructed, not when this method is called.

If this method and succeeded are both to be called, succeeded must be called first.

Implemented in paludis::FormatMessagesOutputManager, paludis::CommandOutputManager, paludis::TeeOutputManager, paludis::IPCOutputManager, paludis::FileOutputManager, paludis::ForwardAtFinishOutputManager, paludis::BufferOutputManager, and paludis::StandardOutputManager.

virtual void paludis::OutputManager::succeeded ( )
pure virtual

Called if an action succeeds. This can be used to, for example, unlink the files behind a to-disk logged output manager.

If an OutputManager is destroyed without having had this method called, it should assume failure. This might mean keeping rather than removing log files, for example.

Further messages and output may occur even after a call to this method.

Calls to this method are done by the caller, not by whatever carries out the action in question.

If ignore_succeeded() has previously been called, does nothing.

Implemented in paludis::FormatMessagesOutputManager, paludis::CommandOutputManager, paludis::TeeOutputManager, paludis::IPCOutputManager, paludis::FileOutputManager, paludis::ForwardAtFinishOutputManager, paludis::BufferOutputManager, and paludis::StandardOutputManager.

virtual bool paludis::OutputManager::want_to_flush ( ) const
pure virtual

Do we want to flush?

Provides a way for clients to avoid having to call flush() with a prefixed header when there's no output waiting.

Implemented in paludis::FormatMessagesOutputManager, paludis::CommandOutputManager, paludis::TeeOutputManager, paludis::IPCOutputManager, paludis::FileOutputManager, paludis::ForwardAtFinishOutputManager, paludis::BufferOutputManager, and paludis::StandardOutputManager.


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