1
2// vim:sw=2:ai
3
4/*
5 * Copyright (C) 2010 DeNA Co.,Ltd.. All rights reserved.
6 * See COPYRIGHT.txt for details.
7 */
8
9#include <stdlib.h>
10#include <stdio.h>
11#include <syslog.h>
12#include <unistd.h>
13
14#include "fatal.hpp"
15
16namespace dena {
17
18const int opt_syslog = LOG_ERR | LOG_PID | LOG_CONS;
19
20void
21fatal_abort(const std::string& message)
22{
23 fprintf(stderr, "FATAL_COREDUMP: %s\n", message.c_str());
24 syslog(opt_syslog, "FATAL_COREDUMP: %s", message.c_str());
25 abort();
26}
27
28};
29
30