Sack Library Documentation
ContentsIndexReferenceHome
PreviousUpNext
sack::logging Namespace

Handles log output. Logs can be directed to UDP directed, or broadcast, or localhost, or to a file location, and under windows the debugging console log. 

 

lprintf 

SetSystemLog 

SystemLogTime 

 

there are options, when options code is enabled, which control logging output and format. Log file location can be specified generically for instance.... see Options. 

This namespace contains the logging functions. The most basic thing you can do to start logging is use 'lprintf'. 

 

lprintf( "My printf like format %s %d times", "string", 15 );

 

This function takes a format string and arguments compatible with vsnprintf. Internally strings are truncated to 4k length. (that is no single logging message can be more than 4k in length). 

 

There are functions to control logging behavior.

Name 
Description 
The following table lists functions in this documentation. 
The following table lists structs, records, enums in this documentation. 
The following table lists types in this documentation. 
The following table lists macros in this documentation. 
 
Name 
Description 
 
This is function sack::logging::_vxlprintf. 
 
This is function sack::logging::_xlprintf. 
 
result in nano seconds - thousanths of a millisecond... 
 
This is function sack::logging::GetCPUFrequency. 
 
return the current CPU tick 
 
This is function sack::logging::GetPackedTime. 
 
This is function sack::logging::GetTimeEx. 
 
Log a binary buffer. Logs lines representing 16 bytes of data at a time. The hex of each byte in a buffer followed by the text is logged.
 
 
This is function sack::logging::LogBinaryEx. 
 
This is function sack::logging::LogBinaryFL. 
 
utility function to format a cpu delta into a buffer... end-start is always printed... therefore tick_end-0 is print absolute time... formats as millisecond.NNN 
 
This is function sack::logging::ProtectLoggedFilenames. 
 
This is function sack::logging::SetSyslogOptions. 
 
This is function sack::logging::SetSystemLog. 
 
logging level defaults to 1000 which is log everything 
 
This is function sack::logging::SystemLog. 
 
This is function sack::logging::SystemLogEx. 
 
This is function sack::logging::SystemLogFL. 
 
Specify how time is logged. 
Name 
Description 
This is macro sack::logging::_lprintf. 
Log 
Depricated. Logs a format string that takes 0 parameters. 
Log1 
Depricated. Logs a format string that takes 1 parameter. 
Depricated. Logs a format string that takes 10 parameters. 
Log2 
Depricated. Logs a format string that takes 2 parameters. 
Log3 
Depricated. Logs a format string that takes 3 parameters. 
Log4 
Depricated. Logs a format string that takes 4 parameters. 
Log5 
Depricated. Logs a format string that takes 5 parameters. 
Log6 
Depricated. Logs a format string that takes 6 parameters. 
Log7 
Depricated. Logs a format string that takes 7 parameters. 
Log8 
Depricated. Logs a format string that takes 8 parameters. 
Log9 
Depricated. Logs a format string that takes 9 parameters. 
This is macro sack::logging::lprintf. 
This is macro sack::logging::OutputLogString. 
This is macro sack::logging::SystemLog. 
use printf formating to output to the log. (log printf). 
This is macro sack::logging::vxlprintf. 
This is macro sack::logging::xlprintf. 
 
Name 
Description 
 
Parameters for SetSystemLog() to specify where the logging should go. 
 
this is a flag set consisting of 0 or more or'ed symbols 
 
When setting options using SetSyslogOptions() these are the defines for the bits passed.
SYSLOG_OPT_OPENAPPEND - the file, when opened, will be opened for append.
SYSLOG_OPT_OPEN_BACKUP - the file, if it exists, will be renamed automatically.
SYSLOG_OPT_LOG_PROGRAM_NAME - enable logging the program executable (probably the same for all messages, unless they are network)
SYSLOG_OPT_LOG_THREAD_ID - enables logging the unique process and thread ID.
SYSLOG_OPT_LOG_SOURCE_FILE - enable logging source file information. See DBG_PASS
SYSLOG_OPT_MAX - used for declaring a flagset to pass to setoptions. 
Name 
Description 
This is type sack::logging::RealLogFunction. 
int result is useless... but allows this to be within expressions, which with this method should be easy. 
 
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.
Copyright (c) 2000+. All rights reserved.
What do you think about this topic? Send feedback!