37{
39 FOutputDevice* OutputDevice = GWarn;
40 if(OutputDevice == nullptr){return;}
41 FString NetModeString;
42 switch(GetWorld()->GetNetMode())
43 {
44 case NM_Standalone:
45 NetModeString = FString("SDL");
46 break;
47 case NM_DedicatedServer:
48 NetModeString = FString("DServer");
49 break;
50 case NM_ListenServer:
51 NetModeString = FString("LServer");
52 break;
53 case NM_Client:
54 NetModeString = FString("Client");
55 break;
56 default:
57 NetModeString = FString("Unknown");
58 break;
59 }
60 const FString FullMessage = FString::Printf(TEXT("%s: %s::%s"), *NetModeString, *GetName(), *Message);
61 if(bError)
62 {
63 OutputDevice->Log(
CategoryName, ELogVerbosity::Error, FullMessage);
64 }
65 else if(bWarning)
66 {
67 OutputDevice->Log(
CategoryName, ELogVerbosity::Warning, FullMessage);
68 }
69 else
70 {
71 OutputDevice->Log(
CategoryName, ELogVerbosity::Log, FullMessage);
72 }
73}