Colors.hpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /**
  15. * @file Colors.hpp
  16. */
  17. #ifndef _FASTRTPS_LOG_COLORS_H_
  18. #define _FASTRTPS_LOG_COLORS_H_
  19. #if defined(_WIN32)
  20. #define C_DEF ""
  21. #define C_RED ""
  22. #define C_B_RED ""
  23. #define C_GREEN ""
  24. #define C_B_GREEN ""
  25. #define C_YELLOW ""
  26. #define C_B_YELLOW ""
  27. #define C_BLUE ""
  28. #define C_B_BLUE ""
  29. #define C_MAGENTA ""
  30. #define C_B_MAGENTA ""
  31. #define C_CYAN ""
  32. #define C_B_CYAN ""
  33. #define C_WHITE ""
  34. #define C_B_WHITE ""
  35. #define C_BRIGHT ""
  36. #else
  37. #define C_DEF "\033[m"
  38. #define C_RED "\033[31m"
  39. #define C_B_RED "\033[31;1m"
  40. #define C_GREEN "\033[32m"
  41. #define C_B_GREEN "\033[32;1m"
  42. #define C_YELLOW "\033[33m"
  43. #define C_B_YELLOW "\033[33;1m"
  44. #define C_BLUE "\033[34m"
  45. #define C_B_BLUE "\033[34;1m"
  46. #define C_MAGENTA "\033[35m"
  47. #define C_B_MAGENTA "\033[35;1m"
  48. #define C_CYAN "\033[36m"
  49. #define C_B_CYAN "\033[36;1m"
  50. #define C_WHITE "\033[37m"
  51. #define C_B_WHITE "\033[37;1m"
  52. #define C_BRIGHT "\033[1m"
  53. #endif
  54. #endif /* _FASTRTPS_LOG_COLORS_H_ */