aboutsummaryrefslogtreecommitdiff
path: root/zencore/trace.cpp
blob: 3042c80c835917b93256ee355bc91532d46c9342 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// Copyright Epic Games, Inc. All Rights Reserved.

#if ZEN_WITH_TRACE

#include <zencore/zencore.h>

#define TRACE_IMPLEMENT 1
#include <zencore/trace.h>
//#undef TRACE_IMPLEMENT

void TraceInit(const char* HostOrPath, TraceType Type)
{
	switch (Type)
	{
	case TraceType::Network:
		trace::SendTo(HostOrPath);
		break;

	case TraceType::File:
		trace::WriteTo(HostOrPath);
		break;
	}

	trace::FInitializeDesc Desc = {
		.bUseImportantCache = false,
	};
	trace::Initialize(Desc);

	trace::ToggleChannel("cpu", true);
}

#endif // ZEN_WITH_TRACE