3DCoat Core API
The 3DCoat API documentation.
Loading...
Searching...
No Matches
Public Member Functions | List of all members
coat::logger Class Reference

Public Member Functions

 logger ()
 create the logger object. You may call directTo later and flush the output there. Otherwise, the output will be directed to the Log.txt in case if you call flush();
 
 logger (const char *filename)
 create the logger object and direct the output there
 
void open ()
 open the accumulated log in the default text editor
 
void showMessage ()
 show the accumulated log in the message box
 
loggerdirectTo (const char *filename)
 Direct the log output to the file

 
str getFullPath ()
 Returns the absolute path to the log file.
 
loggeroperator<< (const char *)
 send the string to the output
 
loggeroperator<< (str &)
 send the string to the output
 
loggeroperator<< (const wchar_t *)
 send the Unicode string to the output
 
loggeroperator<< (int)
 send the integer value to the output
 
loggeroperator<< (float)
 send the float value to the output in correspondence with the current precission
 
loggeroperator<< (double)
 send the double value to the output in correspondence with the current precission
 
loggeroperator<< (const vec2 &)
 send the 2d vector to the output
 
loggeroperator<< (const vec3 &)
 send the 3d vector to the output
 
loggeroperator<< (const vec4 &)
 send the 4d vector to the output
 
loggeroperator<< (BaseClass *)
 send the BaseClass to the output as json
 
loggerformat (const char *format,...)
 send the formatted message
 
loggerflush ()
 save all acumulated text to the file
 
loggernewline ()
 start newline in the text file
 
loggertimestamp ()
 add the timestamp to the log as the
 
loggerstartTimer ()
 start the timer to profile some operation
 
loggerendTimer ()
 stop the timer and output the time into the log as amount of microseconds
 
loggerfloatPrecission (int signs=2)
 set the precission of floating-point output
 

Detailed Description

Examples
Logging.cpp.

Constructor & Destructor Documentation

◆ logger()

coat::logger::logger ( const char *  filename)

create the logger object and direct the output there

Parameters
filenamethe filename to direct

Member Function Documentation

◆ directTo()

logger & coat::logger::directTo ( const char *  filename)

Direct the log output to the file

Parameters
filenamethe filename to log there. The filename may be relative path.
Returns
the logger reference

◆ endTimer()

logger & coat::logger::endTimer ( )

stop the timer and output the time into the log as amount of microseconds

Returns
the reference

◆ floatPrecission()

logger & coat::logger::floatPrecission ( int  signs = 2)

set the precission of floating-point output

Returns
the reference

◆ flush()

logger & coat::logger::flush ( )

save all acumulated text to the file

Returns
the chain reference

◆ format()

logger & coat::logger::format ( const char *  format,
  ... 
)

send the formatted message

Parameters
format
...
Returns
the reference

◆ getFullPath()

str coat::logger::getFullPath ( )

Returns the absolute path to the log file.

Returns
the absolute path even if you passed the relative path.

◆ newline()

logger & coat::logger::newline ( )

start newline in the text file

Returns
the chain reference

◆ operator<<() [1/10]

logger & coat::logger::operator<< ( BaseClass )

send the BaseClass to the output as json

Returns
the reference

◆ operator<<() [2/10]

logger & coat::logger::operator<< ( const char *  )

send the string to the output

Returns
the reference

◆ operator<<() [3/10]

logger & coat::logger::operator<< ( const vec2 )

send the 2d vector to the output

Returns
the reference

◆ operator<<() [4/10]

logger & coat::logger::operator<< ( const vec3 )

send the 3d vector to the output

Returns
the reference

◆ operator<<() [5/10]

logger & coat::logger::operator<< ( const vec4 )

send the 4d vector to the output

Returns
the reference

◆ operator<<() [6/10]

logger & coat::logger::operator<< ( const wchar_t *  )

send the Unicode string to the output

Returns
the reference

◆ operator<<() [7/10]

logger & coat::logger::operator<< ( double  )

send the double value to the output in correspondence with the current precission

Returns
the reference

◆ operator<<() [8/10]

logger & coat::logger::operator<< ( float  )

send the float value to the output in correspondence with the current precission

Returns
the reference

◆ operator<<() [9/10]

logger & coat::logger::operator<< ( int  )

send the integer value to the output

Returns
the refernce

◆ operator<<() [10/10]

logger & coat::logger::operator<< ( str )

send the string to the output

Returns
the reference

◆ startTimer()

logger & coat::logger::startTimer ( )

start the timer to profile some operation

Returns
the reference

◆ timestamp()

logger & coat::logger::timestamp ( )

add the timestamp to the log as the

Returns
the reference

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