| |
| BOOL WINAPI FtpGetServerLogFile( |
| |
HSERVER hServer, |
|
| |
UINT *lpnLogFormat, |
|
| |
UINT *lpnLogLevel, |
|
| |
LPTSTR lpszFileName, |
|
| |
INT nMaxLength |
|
| ); |
Return the current log file format and the full path to the file.
Parameters
- hServer
- The server handle.
- lpnLogFormat
- A pointer to an integer value that will contain the log file format
being used when the function returns. If this information is not
needed, this parameter may be NULL. The following formats are
supported:
| Value |
Description |
| FTP_LOGFILE_NONE |
This value specifies that the server should not create or
update a log file. |
| FTP_LOGFILE_COMMON |
This value specifies that the log file should use the common
log format that records a subset of information in a fixed
format. This log format usually only provides information about
file transfers. |
| FTP_LOGFILE_EXTENDED |
This value specifies that the log file should use the
standard W3C extended log file format. This is an extensible
format that can provide additional information about the client
session. |
- lpnLogLevel
- A pointer to an integer value that will contain the level of detail
the server uses when generating the log file. The minimum value is 1
and the maximum value is 10. If this information is not needed, this
parameter may be NULL.
- lpszFileName
- A null-terminated string buffer that will contain the full path to
the log file. This parameter may be NULL if this information is not
required.
- nMaxLength
- An integer that specifies the maximum number of characters that
can be copied into the file name string, including the
terminating null character. If the lpszFileName parameter is
NULL, this value should be zero.
Return Value
An integer value which specifies the current log file format. Refer
to the FTPSERVERCONFIG structure definition for a list of
supported log file formats. If the server handle is invalid or logging
has not been enabled, this function will return a value of zero.
Remarks
If the server is configured with logging enabled, but a log file
name is not explicitly provided, then the server will automatically
generate one. This function can be used to get the full path to the
current log file along with the format that is being used to record
client session data. Normally the log file is held open by the server
thread while it is active, however you can call the
FtpRenameServerLogFile function to explicitly rename or delete the
log file.
To change the name of the log file, the log file format or
level of detail, use the FtpSetServerLogFile function.
Requirements
Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools12.h
Import Library: csftsv12.lib
Unicode: Implemented as Unicode and ANSI versions
See Also
|
|