You need to add
bUseLoggingInShipping = true;
in your ServerTargetRules
public class YourProjectNameServerTarget : TargetRules
{
public YourProjectNameServerTarget(TargetInfo Target)
{
Type = TargetType.Server;
bUsesSlate = false;
bUseLoggingInShipping = true; // If you want logging in shipping build
}
//
// TargetRules interface.
//