Skip to content

Commit d42c6c8

Browse files
committed
Enable logging for Debug builds only
1 parent e81196d commit d42c6c8

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

group/GPSTrackerCLI.mmp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,3 @@ START RESOURCE GPSTrackerCLI_reg.rss
3030
END
3131
SOURCEPATH ..\src
3232
SOURCE KeyboardActive.cpp TrackWriter.cpp Logger.cpp
33-
34-
MACRO LOGGING_ENABLED=1

inc/Logger.h

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,17 @@
1414
#include <f32file.h>
1515

1616

17-
// Check that ENABLE_LOGGING is defined
17+
/*// Check that ENABLE_LOGGING is defined
1818
#ifndef LOGGING_ENABLED
1919
#warning LOGGING_ENABLED not defined!
2020
#define LOGGING_ENABLED 0
21+
#endif*/
22+
23+
// Enable logging only in Debug-builds
24+
#ifdef _DEBUG
25+
#define LOGGING_ENABLED 1
26+
#else
27+
#define LOGGING_ENABLED 0
2128
#endif
2229

2330

src/GPSTrackerCLI.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,14 @@
2121
#include "KeyboardActive.h"
2222
#include "TrackWriter.h"
2323

24+
25+
#ifdef _DEBUG
26+
#define LOGGING_ENABLED 1
27+
#else
28+
#define LOGGING_ENABLED 0
29+
#endif
30+
31+
2432
// Constants
2533

2634
_LIT(KProgramName, "GPS Tracker CLI");

0 commit comments

Comments
 (0)