Log prints to dedicated server cmd window

I need to debug what’s going on in my cooked dedicated server (created with BuildCookRun). As I understand it, the only way to do that is via logging. The problem I’m facing now is that my log prints don’t show up in the server console window (started via cmd window MyGame.exe -log).

It logs full well up until “LogLoad: Full Startup” but after that I get a warning saying: “LogExternalProfiler:Warning: No registered external profiler was matched with a command-line switch (or the DLL could not be loaded). External profiling features will not be available.”

After that, no more logs get printed. I tried adding logs before that point and those work. Does anyone know what I’m doing wrong?

Hi Marthalion,

I have run through the steps of making a dedicated server and using logs to print out to it and I am not seeing any issue with the logs showing or with the “DLL could not be loaded” message.

On my end, I am logging a projectile that is created when a player fires their weapon:

if( Role == ROLE_Authority )
{
    UE_LOG(LogTemp, Warning, TEXT("[SERVER] Proj class %s"), *ProjectileClass->GetName());
}
  • Are you able to replicate this
    behavior with a new project?
  • Can you
    post the code you are using when
    logging?

Hi, thank you for the reply.

I haven’t tested with a brand new project, but I imagine that it would work as intended. I’ll try to squeeze some time in to try that. The code I’m using looks like this:

Client_PrintLog(FString("Server_Login_Implementation entered. Authority role: ") + FString::FromInt(Role));
if (Role >= ROLE_Authority)
{
    Client_PrintLog(FString("Initiating log in with acc: ") + SteamAccountId);
    UE_LOG(LogDebug, Log, TEXT("Initiating log in with acc '%s'"), *SteamAccountId);
}

The Client_PrintLog method just sends the client a request to do the logging instead. That way I’ve gotten around the issue for now.
I’ve tried using built in log categories (LogInit for one since that worked when the server was starting up) and I’ve tried switching over to Display instead of Log but nothing changes.

I’m pretty sure that it’s just a stupid config issue or something like that that I’m having. Was mostly posting here to see if anyone recognized the issue.

Update:

My code is based on the shooter game example. I just tried to create a dedicated server from a clean shooter game using a clean 4.11 engine and I’m getting the same result.

Server starts up, prints that it’s done and its warning. Then trying to connect to it takes about 30s before it times out. no more logs printed. I’m connecting via a built client using console command “open 127.0.0.1:7777”.