Classes | Typedefs | Functions | Variables

sp::io::Log Namespace Reference

Log class has been changed to an own namespace. The syntax remains the same but now you can use "using namespace io::Log;". More...

Classes

class  ScopedTab

Typedefs

typedef boost::function< void(const
io::stringc &Message, s32
Flags)> 
MessageCallback

Functions

SP_EXPORT void setMessageCallback (const MessageCallback &Proc)
SP_EXPORT void error (const stringc &Message, s32 Flags)
SP_EXPORT void warning (const stringc &Message, s32 Flags=LOG_TIME)
 Prints a warning message in yellow.
SP_EXPORT void debug (const stringc &ProcName, const stringc &Message="Invalid arguments", s32 Flags=LOG_TIME)
 Prints a debug message in pink.
SP_EXPORT void message (const stringc &Message, s32 Flags=LOG_TIME)
 Prints a standard message.
SP_EXPORT void setTimeFormat (const ELogTimeFormats Format)
SP_EXPORT ELogTimeFormats getTimeFormat ()
SP_EXPORT void setTabString (const stringc &TabStr)
 Sets the string which is to be added when "upperTab" is called.
SP_EXPORT stringc getTabString ()
SP_EXPORT stringc getCurrentTab ()
 Returns the current string of the whole tab.
SP_EXPORT void upperTab ()
 Adds the tab string to the current tab.
SP_EXPORT void lowerTab ()
 Removes the tab string from the current tab.
SP_EXPORT void setOutputContext (const s32 Context)
SP_EXPORT s32 getOutputContext ()
SP_EXPORT bool open (const stringc &Filename)
SP_EXPORT void close ()
SP_EXPORT void pause (bool isPaused)
 Opens or closes the output stream temporarily.
SP_EXPORT stringc getFormatedTime ()
SP_EXPORT void openConsole (const stringc &Title="")
SP_EXPORT void closeConsole ()
SP_EXPORT void clearConsole ()
SP_EXPORT void pauseConsole ()

Variables

ELogTimeFormats LogTimeFormat = LOGTIME_DISABLE
s32 LogContext = LOGCONTEXT_CONSOLE
stringc LogTabString = " "
stringc LogTab
std::ofstream LogFile
io::stringc LogFilename
bool isLogFile = false
bool isLogPaused = false
MessageCallback LogMessageCallback

Detailed Description

Log class has been changed to an own namespace. The syntax remains the same but now you can use "using namespace io::Log;".


Typedef Documentation

typedef boost::function<void (const io::stringc &Message, s32 Flags)> sp::io::Log::MessageCallback

Function Documentation

SP_EXPORT void sp::io::Log::clearConsole (  ) 
SP_EXPORT void sp::io::Log::close (  ) 
SP_EXPORT void sp::io::Log::closeConsole (  ) 
SP_EXPORT void sp::io::Log::debug ( const stringc &  ProcName,
const stringc &  Message,
s32  Flags 
)

Prints a debug message in pink.

SP_EXPORT void sp::io::Log::error ( const stringc &  Message,
s32  Flags = LOG_TIME 
)

Prints an error message in red into the current output context.

Parameters:
[in] Message Message which is to be printed.
[in] Flags Message flags which can be a combination of the ELogMessageFlags constants.
See also:
ELogMessageFlags
SP_EXPORT stringc sp::io::Log::getCurrentTab (  ) 

Returns the current string of the whole tab.

SP_EXPORT stringc sp::io::Log::getFormatedTime (  ) 
SP_EXPORT s32 sp::io::Log::getOutputContext (  ) 
SP_EXPORT stringc sp::io::Log::getTabString (  ) 
SP_EXPORT ELogTimeFormats sp::io::Log::getTimeFormat (  ) 
SP_EXPORT void sp::io::Log::lowerTab (  ) 

Removes the tab string from the current tab.

See also:
setTabString
SP_EXPORT void sp::io::Log::message ( const stringc &  Message,
s32  Flags 
)

Prints a standard message.

SP_EXPORT bool sp::io::Log::open ( const stringc &  Filename = DEF_DEBUGLOG_FILE  ) 

Opens the debug log file. This also sets the debug log file as an additional output context automatically.

Parameters:
Filename,: Filename for the debug log file. If the file already exists it will be overwritten!
SP_EXPORT void sp::io::Log::openConsole ( const stringc &  Title = ""  ) 
SP_EXPORT void sp::io::Log::pause ( bool  isPaused  ) 

Opens or closes the output stream temporarily.

SP_EXPORT void sp::io::Log::pauseConsole (  ) 
SP_EXPORT void sp::io::Log::setMessageCallback ( const MessageCallback &  Proc  ) 
SP_EXPORT void sp::io::Log::setOutputContext ( const s32  Context  ) 

Sets the output contexts.

See also:
ELogOutputContexts
SP_EXPORT void sp::io::Log::setTabString ( const stringc &  TabStr  ) 

Sets the string which is to be added when "upperTab" is called.

SP_EXPORT void sp::io::Log::setTimeFormat ( const ELogTimeFormats  Format  ) 

Sets the time format.

Parameters:
[in] Format Specifies the new time format for the log output. By default LOGTIME_DISABLE.
See also:
ELogTimeFormats
SP_EXPORT void sp::io::Log::upperTab (  ) 

Adds the tab string to the current tab.

See also:
setTabString
SP_EXPORT void sp::io::Log::warning ( const stringc &  Message,
s32  Flags 
)

Prints a warning message in yellow.


Variable Documentation

bool sp::io::Log::isLogFile = false
s32 sp::io::Log::LogContext = LOGCONTEXT_CONSOLE
std::ofstream sp::io::Log::LogFile
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines