mirror of
https://github.com/ninjamuffin99/Funkin.git
synced 2025-01-10 06:07:09 +00:00
Define for enabling/disabling log trace
This commit is contained in:
parent
61d23b9985
commit
119148acf0
|
@ -157,6 +157,13 @@ class Project extends HXProject {
|
||||||
*/
|
*/
|
||||||
static final FEATURE_DEBUG_TRACY:FeatureFlag = "FEATURE_DEBUG_TRACY";
|
static final FEATURE_DEBUG_TRACY:FeatureFlag = "FEATURE_DEBUG_TRACY";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* `-DFEATURE_LOG_TRACE`
|
||||||
|
* If this flag is enabled, the game will print debug traces to the console.
|
||||||
|
* Disable to improve performance a bunch.
|
||||||
|
*/
|
||||||
|
static final FEATURE_LOG_TRACE:FeatureFlag = "FEATURE_LOG_TRACE";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* `-DFEATURE_DISCORD_RPC`
|
* `-DFEATURE_DISCORD_RPC`
|
||||||
* If this flag is enabled, the game will enable the Discord Remote Procedure Call library.
|
* If this flag is enabled, the game will enable the Discord Remote Procedure Call library.
|
||||||
|
@ -461,6 +468,7 @@ class Project extends HXProject {
|
||||||
|
|
||||||
// Should be true on debug builds or if GITHUB_BUILD is enabled.
|
// Should be true on debug builds or if GITHUB_BUILD is enabled.
|
||||||
FEATURE_DEBUG_FUNCTIONS.apply(this, isDebug() || GITHUB_BUILD.isEnabled(this));
|
FEATURE_DEBUG_FUNCTIONS.apply(this, isDebug() || GITHUB_BUILD.isEnabled(this));
|
||||||
|
FEATURE_LOG_TRACE.apply(this, isDebug());
|
||||||
|
|
||||||
// Should default to true on workspace builds and false on release builds.
|
// Should default to true on workspace builds and false on release builds.
|
||||||
REDIRECT_ASSETS_FOLDER.apply(this, isDebug() && isDesktop());
|
REDIRECT_ASSETS_FOLDER.apply(this, isDebug() && isDesktop());
|
||||||
|
|
|
@ -6,7 +6,7 @@ class AnsiTrace
|
||||||
// but adds nice cute ANSI things
|
// but adds nice cute ANSI things
|
||||||
public static function trace(v:Dynamic, ?info:haxe.PosInfos)
|
public static function trace(v:Dynamic, ?info:haxe.PosInfos)
|
||||||
{
|
{
|
||||||
#if TREMOVE
|
#if NO_FEATURE_LOG_TRACE
|
||||||
return;
|
return;
|
||||||
#end
|
#end
|
||||||
var str = formatOutput(v, info);
|
var str = formatOutput(v, info);
|
||||||
|
|
Loading…
Reference in a new issue