![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <OutputDeviceFile.h>
Inheritance diagram for FOutputDeviceFile:Classes | |
| struct | FCategoryInclusionInternal |
Static Public Member Functions | |
| static CORE_API void | CreateBackupCopy (const TCHAR *Filename) |
| static CORE_API bool | IsBackupCopy (const TCHAR *Filename) |
Additional Inherited Members | |
Protected Attributes inherited from FOutputDevice | |
| bool | bSuppressEventTag |
| bool | bAutoEmitLineTerminator |
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 | bInDisableBackup = false, |
||
| bool | bInAppendIfExists = false, |
||
| bool | bCreateWriterLazily = true, |
||
| TFunction< void(const TCHAR *)> | FileOpenedCallback = TFunction<void(const TCHAR*)>() |
||
| ) |
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. |
| FileOpenedCallback | If bound, invoked when the output file is successfully opened, passing the actual filename. |
Constructor, initializing member variables.
| InFilename | Filename to use, can be NULL |
| bInDisableBackup | If true, existing files will not be backed up |
| FOutputDeviceFile::~FOutputDeviceFile | ( | ) |
Destructor to perform teardown
Reimplemented from FOutputDevice.
Reimplemented from FOutputDevice.
Creates a backup copy of a log file if it already exists
if the passed in file exists, makes a timestamped backup copy
| Filename | the name of the file to check |
Flush the write cache so the file isn't truncated in case we crash right after calling this function.
Reimplemented from FOutputDevice.
|
inline |
Returns the filename associated with this output device
Add a category name to our inclusion filter. As soon as one inclusion exists, all others will be ignored
Checks if the filename represents a backup copy of a log file
| bool FOutputDeviceFile::IsOpened | ( | ) | const |
|
overridevirtual |
|
overridevirtual |
Serializes the passed in data unless the current event is suppressed.
| Data | Text to log |
| Event | Event name used for suppression purposes |
Reimplemented in FIOSOutputDeviceFile.
Sets the filename that the output device writes to. If the output device was already writing to a file, closes that file.
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.
Reimplemented from FOutputDevice.