Remove debug messages
This commit is contained in:
		@@ -48,7 +48,7 @@ struct Token {
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct Config {
 | 
			
		||||
    std::string smtp_host, smtp_user, smtp_pass, smtp_from, admin_mail; // TODO: Send mail to admin on crash
 | 
			
		||||
    std::string smtp_host, smtp_user, smtp_pass, smtp_from, admin_mail;
 | 
			
		||||
    std::uint16_t smtp_port, server_port;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -17,7 +17,6 @@ SaveNode load_node(const rapidjson::Value &doc) {
 | 
			
		||||
 | 
			
		||||
    ASSIGN_MEMBER(node->id, id, Uint64);
 | 
			
		||||
    id = node->id;
 | 
			
		||||
    data_logger->debug("Loading node {}", id);
 | 
			
		||||
 | 
			
		||||
    ASSIGN_MEMBER(node->name, name, String);
 | 
			
		||||
    ASSIGN_MEMBER(node->file, file, Bool);
 | 
			
		||||
 
 | 
			
		||||
@@ -21,6 +21,7 @@ void signal_shutdown(const int) {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
int main() {
 | 
			
		||||
    // TODO add current timestamp to log name
 | 
			
		||||
    auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>("log.txt");
 | 
			
		||||
    spdlog::default_logger()->sinks().push_back(file_sink);
 | 
			
		||||
    spdlog::set_level(spdlog::level::trace);
 | 
			
		||||
 
 | 
			
		||||
@@ -5,9 +5,11 @@
 | 
			
		||||
#include <spdlog/spdlog.h>
 | 
			
		||||
 | 
			
		||||
// TODO implement backtrace
 | 
			
		||||
// TODO Send mail to admin on crash
 | 
			
		||||
[[noreturn]]
 | 
			
		||||
static void crash(std::source_location loc = std::source_location::current()) {
 | 
			
		||||
    spdlog::critical("crash called from: {}:{} `{}`", loc.file_name(), loc.line(), loc.function_name());
 | 
			
		||||
    spdlog::details::registry::instance().flush_all();
 | 
			
		||||
    spdlog::shutdown();
 | 
			
		||||
    std::abort();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user