Logger.hpp 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) 2002-2009 Moxie Marlinspike
  3. *
  4. * This program is free software; you can redistribute it and/or
  5. * modify it under the terms of the GNU General Public License as
  6. * published by the Free Software Foundation; either version 3 of the
  7. * License, or (at your option) any later version.
  8. *
  9. * This program is distributed in the hope that it will be useful, but
  10. * WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. * General Public License for more details.
  13. *
  14. * You should have received a copy of the GNU General Public License
  15. * along with this program; if not, write to the Free Software
  16. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
  17. * USA
  18. */
  19. #ifndef __LOGGER_H__
  20. #define __LOGGER_H__
  21. #include "http/HttpHeaders.hpp"
  22. #include <string>
  23. class Logger {
  24. public:
  25. static void initialize(std::string &path, bool postOnly);
  26. static void logFromServer(std::string &name, char *buf, int len);
  27. static void logFromClient(std::string &name, char* buf, int len);
  28. static void logFromClient(std::string &name, HttpHeaders &headers);
  29. static void logError(std::string error);
  30. static void logUpdateRequest(std::string &product, std::string &version,
  31. std::string &buildId, std::string &buildTarget,
  32. std::string &locale, std::string &channel,
  33. std::string &filename);
  34. static void logAddonUpdate(std::string &appId);
  35. static void logInit(std::string message);
  36. };
  37. #endif