API for Initializing, configuring, and shutdown the logging facility.
More...
|
#define | SFLOG_INIT SFLOG_INITW |
| An alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant.
|
|
|
int __stdcall | SFLOG_INITW (LPCWSTR szAppName, LPCWSTR szLogDir, DWORD dwBackupFiles, size_t ulMaxFileSize, unsigned int *pClientToken) |
| Initializes the logging facility of the NumXL SDK using Unicode strings for the logging base filename and directory..
|
|
int __stdcall | SFLOG_INITA (LPCSTR szAppName, LPCSTR szLogDir, DWORD dwBackupFiles, size_t ulMaxFileSize, unsigned int *pClientToken) |
| Initialize the logging system for SDK. This is often the first API call that an application makes and is a prerequisite for other logging APIs.
|
|
int __stdcall | SFLOG_SHUTDOWN (unsigned int uClientToken) |
| Shutdown and release resources allocated by logging system.
|
|
int __stdcall | SFLOG_GETLEVEL (unsigned int *nLevel) |
| retieve the current logging level (or threshold) in the logging system.
|
|
int __stdcall | SFLOG_SETLEVEL (unsigned int uClientToken, unsigned int nLevel) |
| set the new logging level in the SDK
|
|
The NumXL SDK logging subsystem definie a logging level to determine whether a message is written to the log file or not. The numeric integer value of the logging level is represented by the value of one of those macros.
◆ SFLOG_INIT
◆ SFLOG_GETLEVEL()
int __stdcall SFLOG_GETLEVEL |
( |
unsigned int * | nLevel | ) |
|
- Parameters
-
[out] | nLevel | (Required) Is the currently-selected logging level (e.g. debug, info, trace). For a full list, see Logging Levels |
- Returns
- status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
- Return values
-
- See also
- SFLOG_SETLEVEL
querys and returns the current logging level in the logging subsystem
- Requirements
| |
Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |
◆ SFLOG_INITA()
int __stdcall SFLOG_INITA |
( |
LPCSTR | szAppName, |
|
|
LPCSTR | szLogDir, |
|
|
DWORD | dwBackupFiles, |
|
|
size_t | ulMaxFileSize, |
|
|
unsigned int * | pClientToken ) |
- Parameters
-
[in] | szAppName | (Required) Is the application name (user-defined), but must match the configuration base filename |
[in] | szLogDir | (Optional) Is the full (absolute) path of the log file directory. If missing (i.e. NULL), SFLOG_Init uses the default temp directory in the current user's profile |
[in] | dwBackupFiles | (Required) Is the number of backup log files to keep, before we overwite the oldest one |
[in] | ulMaxFileSize | (Required) Is the maximym file size, before a rolling a new file starts (in bytes) |
[out] | pClientToken | An integer token used during the logging shutdown |
- Returns
- status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
- Return values
-
- See also
- SFLOG_SHUTDOWN, SFLOG_INIT
- Note
- The SFLOG.h header defines SFLOG_INIT as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant.
- Requirements
| |
Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |
- Examples
- log_ascii.cpp.
◆ SFLOG_INITW()
int __stdcall SFLOG_INITW |
( |
LPCWSTR | szAppName, |
|
|
LPCWSTR | szLogDir, |
|
|
DWORD | dwBackupFiles, |
|
|
size_t | ulMaxFileSize, |
|
|
unsigned int * | pClientToken ) |
- Parameters
-
[in] | szAppName | (Required) Is the application name (user-defined), but must match the configuration base filename |
[in] | szLogDir | (Optional) Is the full (absolute) path of the log file directory. If missing (i.e. NULL), SFLOG_Init uses the default temp directory in the current user's profile |
[in] | dwBackupFiles | (Required) Is the number of backup log files to keep, before we overwrite the oldest one |
[in] | ulMaxFileSize | (Required) Is the maximym file size, before a rolling a new file starts (in bytes) |
[out] | pClientToken | an integer token used during the logging shutdown |
- Returns
- status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
- Return values
-
- See also
- SFLOG_SHUTDOWN, SFLOG_INITA
Initialize the logging system and accepts a unicode filename and path.
- Note
- The SFLOG.h header defines SFLOG_INIT as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant.
- A sample code
13 unsigned int uClientToken=0;
14 int nRetCode =
SFLOG_INITW(L
"testapp",L
"C:\\temp", 7, (3*1024*1024),&uClientToken);
16 {
- Requirements
| |
Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |
- Examples
- log_init.cpp, and log_wchar.cpp.
◆ SFLOG_SETLEVEL()
int __stdcall SFLOG_SETLEVEL |
( |
unsigned int | uClientToken, |
|
|
unsigned int | nLevel ) |
- Parameters
-
[in] | uClientToken | (Required) Is the logging system token id (acquired during initialization). |
[in] | nLevel | (Required) Is the new logging level (e.g. debug, info, trace). For a full list, see Logging Levels |
- Returns
- status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
- Return values
-
- See also
- SFLOG_GETLEVEL
sets the current logging level in the logging subsystem
- Note
- Requirements
| |
Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |
◆ SFLOG_SHUTDOWN()
int __stdcall SFLOG_SHUTDOWN |
( |
unsigned int | uClientToken | ) |
|
- Parameters
-
[in] | uClientToken | (Required) Is the logging system token id (acquired during initialization). |
- Returns
- status code of the function call: zero = success, positive = success with a warning, and negative = error occurred.
- Return values
-
- See also
- SFLOG_INITA, SFLOG_INITW, SFLOG_INIT
write all the cache logs to the file and closed the log file.
- Examples
std::wstring szAppName = L"testapp";
std::wstring szLogDir =L"C:\\temp";
DWORD dwBackupFiles=7;
size_t ulMaxFileSize= (1024 * 1024);
unsigned int uClientToken=0;
int nRetCode =
SFLOG_INITW(szAppName.c_str(),szLogDir.c_str(), dwBackupFiles, ulMaxFileSize, &uClientToken);
}
#define NDK_SUCCESS
SUCCESS return code.
Definition SFLOG.h:36
int __stdcall SFLOG_INITW(LPCWSTR szAppName, LPCWSTR szLogDir, DWORD dwBackupFiles, size_t ulMaxFileSize, unsigned int *pClientToken)
Initializes the logging facility of the NumXL SDK using Unicode strings for the logging base filename...
Definition SFLog.cpp:115
int __stdcall SFLOG_SHUTDOWN(unsigned int uClientToken)
Shutdown and release resources allocated by logging system.
Definition SFLog.cpp:296
- Requirements
| |
Target Platform | Windows |
Header | SFLOG.h (include Windows.h) |
Library | SFLOG.lib |
DLL | SFLOG.dll |
- See also
- SFLOG_INIT, SFLOG_INITA, SFLOG_INITW
- References
- Hamilton, J .D.; Time Series Analysis , Princeton University Press (1994), ISBN 0-691-04289-6
- Tsay, Ruey S.; Analysis of Financial Time Series John Wiley & SONS. (2005), ISBN 0-471-690740
- D. S.G. Pollock; Handbook of Time Series Analysis, Signal Processing, and Dynamics; Academic Press; Har/Cdr edition(Nov 17, 1999), ISBN: 125609906
- Box, Jenkins and Reisel; Time Series Analysis: Forecasting and Control; John Wiley & SONS.; 4th edition(Jun 30, 2008), ISBN: 470272848
- Examples
- log_ascii.cpp, log_init.cpp, and log_wchar.cpp.