PageRenderTime 41ms CodeModel.GetById 26ms RepoModel.GetById 0ms app.codeStats 0ms

/indra/media_plugins/gstreamer010/llmediaimplgstreamertriviallogging.h

https://bitbucket.org/lindenlab/viewer-beta/
C++ Header | 55 lines | 19 code | 6 blank | 30 comment | 0 complexity | 4d2c69e7a07278357b602f9601883ef0 MD5 | raw file
Possible License(s): LGPL-2.1
  1. /**
  2. * @file llmediaimplgstreamertriviallogging.h
  3. * @brief minimal logging utilities.
  4. *
  5. * @cond
  6. * $LicenseInfo:firstyear=2009&license=viewerlgpl$
  7. * Second Life Viewer Source Code
  8. * Copyright (C) 2010, Linden Research, Inc.
  9. *
  10. * This library is free software; you can redistribute it and/or
  11. * modify it under the terms of the GNU Lesser General Public
  12. * License as published by the Free Software Foundation;
  13. * version 2.1 of the License only.
  14. *
  15. * This library is distributed in the hope that it will be useful,
  16. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  17. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  18. * Lesser General Public License for more details.
  19. *
  20. * You should have received a copy of the GNU Lesser General Public
  21. * License along with this library; if not, write to the Free Software
  22. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  23. *
  24. * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
  25. * $/LicenseInfo$
  26. * @endcond
  27. */
  28. #ifndef __LLMEDIAIMPLGSTREAMERTRIVIALLOGGING_H__
  29. #define __LLMEDIAIMPLGSTREAMERTRIVIALLOGGING_H__
  30. #include <cstdio>
  31. extern "C" {
  32. #include <sys/types.h>
  33. #include <unistd.h>
  34. }
  35. /////////////////////////////////////////////////////////////////////////
  36. // Debug/Info/Warning macros.
  37. #define MSGMODULEFOO "(media plugin)"
  38. #define STDERRMSG(...) do{\
  39. fprintf(stderr, " pid:%d: ", (int)getpid());\
  40. fprintf(stderr, MSGMODULEFOO " %s:%d: ", __FUNCTION__, __LINE__);\
  41. fprintf(stderr, __VA_ARGS__);\
  42. fputc('\n',stderr);\
  43. }while(0)
  44. #define NULLMSG(...) do{}while(0)
  45. #define DEBUGMSG NULLMSG
  46. #define INFOMSG STDERRMSG
  47. #define WARNMSG STDERRMSG
  48. /////////////////////////////////////////////////////////////////////////
  49. #endif /* __LLMEDIAIMPLGSTREAMERTRIVIALLOGGING_H__ */