File output device (Note: Only works if ALLOW_LOG_FILE && !NO_LOGGING is true, otherwise Serialize does nothing). 更多...
#include <OutputDeviceFile.h>
继承自 FOutputDevice .
被 FIOSOutputDeviceFile 继承.
Public 成员函数 | |
| void | Flush () override |
| Flush the write cache so the file isn't truncated in case we crash right after calling this function. | |
| FOutputDeviceFile (const TCHAR *InFilename=nullptr, bool bDisableBackup=false, bool bAppendIfExists=false, bool bCreateWriterLazily=true) | |
| Constructor, initializing member variables. 更多... | |
| const TCHAR * | GetFilename () const |
| Returns the filename associated with this output device | |
| void | IncludeCategory (const class FName &InCategoryName) |
| Add a category name to our inclusion filter. 更多... | |
| void | SetFilename (const TCHAR *InFilename) |
| Sets the filename that the output device writes to. 更多... | |
| void | TearDown () override |
| Closes output device and cleans up. 更多... | |
| ~FOutputDeviceFile () | |
| Destructor to perform teardown 更多... | |
File output device (Note: Only works if ALLOW_LOG_FILE && !NO_LOGGING is true, otherwise Serialize does nothing).
| FOutputDeviceFile::FOutputDeviceFile | ( | const TCHAR * | InFilename = nullptr, |
| bool | bDisableBackup = false, |
||
| bool | bAppendIfExists = false, |
||
| bool | bCreateWriterLazily = true |
||
| ) |
Constructor, initializing member variables.
| InFilename | Filename to use, can be nullptr. If null, a file name will be automatically generated. If a filename is specified but cannot be opened because it is already open/used by another process, the implementation will try to generate a new name automatically, until the a file is created or the number of trials exhausted (32). |
| bDisableBackup | If true, existing files will not be backed up |
| bCreateWriterLazily | If true, delay the creation of the file until something needs to be written, otherwise, open it immediatedly. |
| FOutputDeviceFile::~FOutputDeviceFile | ( | ) |
Destructor to perform teardown
| void FOutputDeviceFile::IncludeCategory | ( | const class FName & | InCategoryName | ) |
Add a category name to our inclusion filter.
As soon as one inclusion exists, all others will be ignored
| void FOutputDeviceFile::SetFilename | ( | const TCHAR * | InFilename | ) |
Sets the filename that the output device writes to.
If the output device was already writing to a file, closes that file.
|
override |
Closes output device and cleans up.
This can't happen in the destructor as we have to call "delete" which cannot be done for static/ global objects.