1 #pragma once
2 
3 /** \file debug_types.h
4  *  Define the various logging classes and priorities
5  */
6 
7 /**
8  * Define the possible classes/categories of logging messages
9  */
10 typedef enum {
11     SG_NONE        = 0x00000000,
12 
13     SG_TERRAIN     = 0x00000001,
14     SG_ASTRO       = 0x00000002,
15     SG_FLIGHT      = 0x00000004,
16     SG_INPUT       = 0x00000008,
17     SG_GL          = 0x00000010,
18     SG_VIEW        = 0x00000020,
19     SG_COCKPIT     = 0x00000040,
20     SG_GENERAL     = 0x00000080,
21     SG_MATH        = 0x00000100,
22     SG_EVENT       = 0x00000200,
23     SG_AIRCRAFT    = 0x00000400,
24     SG_AUTOPILOT   = 0x00000800,
25     SG_IO          = 0x00001000,
26     SG_CLIPPER     = 0x00002000,
27     SG_NETWORK     = 0x00004000,
28     SG_ATC         = 0x00008000,
29     SG_NASAL       = 0x00010000,
30     SG_INSTR       = 0x00020000,
31     SG_SYSTEMS     = 0x00040000,
32     SG_AI          = 0x00080000,
33     SG_ENVIRONMENT = 0x00100000,
34     SG_SOUND       = 0x00200000,
35     SG_NAVAID      = 0x00400000,
36     SG_GUI         = 0x00800000,
37     SG_TERRASYNC   = 0x01000000,
38     SG_PARTICLES   = 0x02000000,
39     SG_HEADLESS    = 0x04000000,
40     // SG_OSG (OSG notify) - will always be displayed regardless of FG log settings as OSG log level is configured
41     // separately and thus it makes more sense to allow these message through.
42     SG_OSG         = 0x08000000,
43     SG_UNDEFD      = 0x10000000, // For range checking
44 
45     SG_ALL         = 0xFFFFFFFF
46 } sgDebugClass;
47 
48 
49 /**
50  * Define the possible logging priorities (and their order).
51  *
52  * Caution - unfortunately, this enum is exposed to Nasal via the logprint()
53  * function as an integer parameter. Therefore, new values should only be
54  * appended, or the priority Nasal reports to compiled code will change.
55  */
56 typedef enum {
57     SG_BULK = 1, // For frequent messages
58     SG_DEBUG,    // Less frequent debug type messages
59     SG_INFO,     // Informatory messages
60     SG_WARN,     // Possible impending problem
61     SG_ALERT,    // Very possible impending problem
62     SG_POPUP,    // Severe enough to alert using a pop-up window
63     // SG_EXIT,        // Problem (no core)
64     // SG_ABORT        // Abandon ship (core)
65 
66     SG_DEV_WARN,  // Warning for developers, translated to other priority
67     SG_DEV_ALERT, // Alert for developers, translated
68 
69     SG_MANDATORY_INFO // information, but should always be shown
70 } sgDebugPriority;
71