Download Gallery/Plugins/Developer/RiderLink/Source/RiderLogging/Private/RiderOutputDevice.cpp from alexlu2/uassets: direct link, hf CLI and curl.
- Browser
- Download file 1.41 kB
-
https://huggingface.co/datasets/alexlu2/uassets/resolve/main/Gallery/Plugins/Developer/RiderLink/Source/RiderLogging/Private/RiderOutputDevice.cpp
- Command line
-
hf download hf://datasets/alexlu2/uassets/Gallery/Plugins/Developer/RiderLink/Source/RiderLogging/Private/RiderOutputDevice.cpp
-
curl -L -o RiderOutputDevice.cpp https://huggingface.co/datasets/alexlu2/uassets/resolve/main/Gallery/Plugins/Developer/RiderLink/Source/RiderLogging/Private/RiderOutputDevice.cpp
1.41 kB
| void FRiderOutputDevice::Serialize(const TCHAR* V, ELogVerbosity::Type Verbosity, const FName& Category) | |
| { | |
| Serialize(V, Verbosity, Category, {}); | |
| } | |
| void FRiderOutputDevice::Serialize(const TCHAR* V, ELogVerbosity::Type Verbosity, const FName& Category, | |
| const double Time) | |
| { | |
| FScopeLock Lock{&CriticalSection}; | |
| onSerializeMessage.ExecuteIfBound(V, Verbosity, Category, {Time}); | |
| } | |
| FRiderOutputDevice::~FRiderOutputDevice() | |
| { | |
| // At shutdown, GLog may already be null | |
| // This should be out of scoped lock, because it'll implicitly try take a lock in OutputDeviceRedirector | |
| // And Serialize is already holding that lock, so we'll have a deadlock here | |
| if (GLog != nullptr) | |
| { | |
| GLog->RemoveOutputDevice(this); | |
| } | |
| } | |
| void FRiderOutputDevice::Setup(TFunction<FOnSerializeMessage::TFuncType> Callback) | |
| { | |
| FScopeLock Lock{&CriticalSection}; | |
| if(onSerializeMessage.IsBound()) return; | |
| onSerializeMessage.BindLambda(Callback); | |
| GLog->AddOutputDevice(this); | |
| GLog->SerializeBacklog(this); | |
| } | |
| void FRiderOutputDevice::TearDown() | |
| { | |
| FScopeLock Lock{&CriticalSection}; | |
| if(onSerializeMessage.IsBound() == false) return; | |
| onSerializeMessage.Unbind(); | |
| } | |