Navigation
API > API/Runtime > API/Runtime/Core
File output device (Note: Only works if ALLOW_LOG_FILE && !NO_LOGGING is true, otherwise Serialize does nothing).
| Name | FOutputDeviceFile |
| Type | class |
| Header File | /Engine/Source/Runtime/Core/Public/Misc/OutputDeviceFile.h |
| Include Path | #include "Misc/OutputDeviceFile.h" |
Syntax
class FOutputDeviceFile : public FOutputDevice
Inheritance Hierarchy
- FOutputDevice → FOutputDeviceFile
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FOutputDeviceFile
(
const TCHAR* InFilename, |
Constructor, initializing member variables.Constructor, initializing member variables. | Misc/OutputDeviceFile.h |
Destructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
~FOutputDeviceFile() |
Destructor to perform teardown | Misc/OutputDeviceFile.h |
Structs
| Name | Remarks |
|---|---|
| FCategoryInclusionInternal |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AppendIfExists | bool | Misc/OutputDeviceFile.h | ||
| AsyncWriter | FAsyncWriter * | Writes to a file on a separate thread | Misc/OutputDeviceFile.h | |
| bCreatingWriter | bool | Misc/OutputDeviceFile.h | ||
| bDisableBackup | bool | If true, existing files will not be backed up | Misc/OutputDeviceFile.h | |
| CategoryInclusionInternal | TUniquePtr< FCategoryInclusionInternal > | Misc/OutputDeviceFile.h | ||
| Dead | bool | Misc/OutputDeviceFile.h | ||
| Filename | TCHAR | Misc/OutputDeviceFile.h | ||
| OnFileOpenedFn | TFunction< void(const TCHAR *)> | In bound, invoked when the log file is open successfully for writing, reporting the actual log filename. | Misc/OutputDeviceFile.h | |
| WriterArchive | FArchive * | Archive used by the async writer | Misc/OutputDeviceFile.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const TCHAR * GetFilename() |
Returns the filename associated with this output device | Misc/OutputDeviceFile.h | |
void IncludeCategory
(
const FName& InCategoryName |
Add a category name to our inclusion filter. | Misc/OutputDeviceFile.h | |
bool IsOpened() |
Misc/OutputDeviceFile.h | ||
virtual void Serialize
(
const TCHAR* Data, |
Misc/OutputDeviceFile.h | ||
virtual void Serialize
(
const TCHAR* Data, |
Serializes the passed in data unless the current event is suppressed. | Misc/OutputDeviceFile.h | |
void SetFilename
(
const TCHAR* InFilename |
Sets the filename that the output device writes to. | Misc/OutputDeviceFile.h |
Overridden from FOutputDevice
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual bool CanBeUsedOnAnyThread() |
Misc/OutputDeviceFile.h | ||
virtual bool CanBeUsedOnPanicThread() |
The return value is cached by AddOutputDevice because calling this during a panic may fail. | Misc/OutputDeviceFile.h | |
virtual void Flush() |
Flush the write cache so the file isn't truncated in case we crash right after calling this function. | Misc/OutputDeviceFile.h | |
virtual void TearDown () |
Closes output device and cleans up. | Misc/OutputDeviceFile.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static void CreateBackupCopy
(
const TCHAR* Filename |
Creates a backup copy of a log file if it already exists | Misc/OutputDeviceFile.h | |
static bool IsBackupCopy
(
const TCHAR* Filename |
Checks if the filename represents a backup copy of a log file | Misc/OutputDeviceFile.h |