Last active
April 17, 2020 01:56
-
-
Save nilebox/f29f610449e109526cfc9e1a2deb1a6c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
// NOTE: Groups with big hex numbers is just an illustration for easier visibility | |
// Option 1: Combined enum | |
enum Severity | |
{ | |
DEBUG = 0x000; | |
DEBUG_TRACE = 0x001; | |
INFO = 0x100; | |
INFO_NOTICE = 0x101; | |
WARNING = 0x200; | |
ERROR = 0x300; | |
ERROR_CRITICAL = 0x301; | |
ERROR_FATAL = 0x302; | |
} | |
// Option 2: Split enums | |
enum SeverityGroup | |
{ | |
DEBUG = 0x000; | |
INFO = 0x100; | |
WARNING = 0x200; | |
ERROR = 0x300; | |
} | |
enum SeverityLevel | |
{ | |
DEBUG_DEFAULT = 0x000; // Same as SeverityGroup.DEBUG | |
DEBUG_TRACE = 0x001; | |
INFO_DEFAULT = 0x100; // Same as SeverityGroup.INFO | |
INFO_NOTICE = 0x101; | |
WARNING_DEFAULT = 0x200; // Same as SeverityGroup.WARNING | |
ERROR_DEFAULT = 0x300; // Same as SeverityGroup.ERROR | |
ERROR_CRITICAL = 0x301; | |
ERROR_FATAL = 0x302; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment