srsRAN/lib/include/srslte/common/logger_stdout.h

45 lines
1.3 KiB
C
Raw Normal View History

2019-04-26 19:27:38 +00:00
/*
2020-03-13 11:12:52 +00:00
* Copyright 2013-2020 Software Radio Systems Limited
2017-06-23 14:29:46 +00:00
*
2019-04-26 19:27:38 +00:00
* This file is part of srsLTE.
2017-06-23 14:29:46 +00:00
*
2019-04-26 19:27:38 +00:00
* srsLTE is free software: you can redistribute it and/or modify
2017-06-23 14:29:46 +00:00
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of
* the License, or (at your option) any later version.
*
2019-04-26 19:27:38 +00:00
* srsLTE is distributed in the hope that it will be useful,
2017-06-23 14:29:46 +00:00
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* A copy of the GNU Affero General Public License can be found in
* the LICENSE file in the top-level directory of this distribution
* and at http://www.gnu.org/licenses/.
*
*/
/******************************************************************************
* File: logger_stdout.h
* Description: Interface for logging output
*****************************************************************************/
2018-03-31 17:04:04 +00:00
#ifndef SRSLTE_LOGGER_STDOUT_H
#define SRSLTE_LOGGER_STDOUT_H
2017-06-23 14:29:46 +00:00
#include "srslte/common/logger.h"
2017-06-23 14:29:46 +00:00
#include <stdio.h>
#include <string>
namespace srslte {
class logger_stdout : public logger
{
public:
void log(unique_log_str_t log_str) { fprintf(stdout, "%s", log_str->str()); }
};
2017-06-23 14:29:46 +00:00
} // namespace srslte
2018-03-31 17:04:04 +00:00
#endif // SRSLTE_LOGGER_STDOUT_H