Functions | Variables

ink_error.cc File Reference

Error reporting routines. More...

#include "libts.h"
#include "ink_error.h"
#include "ink_stack_trace.h"
#include <syslog.h>
#include <signal.h>
Include dependency graph for ink_error.cc:

Go to the source code of this file.

Functions

void ink_die_die_die (int retval)
 This routine causes process death.
void ink_fatal_va (int return_code, const char *fmt, va_list ap)
 This routine prints/logs an error message given the printf format string in message_format, and the optional arguments.
void ink_fatal (int return_code, const char *message_format,...)
void ink_fatal_die (const char *message_format,...)
void ink_pfatal (int return_code, const char *message_format,...)
 This routine prints/logs an error message given the printf format string in message_format, and the optional arguments.
void ink_warning (const char *message_format,...)
 This routine prints/logs a warning message given the printf format string in message_format, and the optional arguments.
void ink_pwarning (const char *message_format,...)
 This routine prints/logs a warning message given the printf format string in message_format, and the optional arguments.
void ink_notice (const char *message_format,...)
 This routine prints/logs a notice message given the printf format string in message_format, and the optional arguments.
void ink_eprintf (const char *message_format,...)
 This routine prints/logs a message given the printf format string in message_format, and the optional arguments.
void ink_error (const char *message_format,...)
 This routine prints/logs a warning message given the printf format string in message_format, and the optional arguments.
void ink_dprintf (int debug_level, const char *message_format,...)
 This routine prints/logs a message given the printf format string in message_format, and the optional arguments.
int ink_set_dprintf_level (int debug_level)
 Set output level for ink_dprintf() function.

Variables

static int ink_dprintf_level = 0

Detailed Description

Error reporting routines.

License

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Definition in file ink_error.cc.


Function Documentation

void ink_die_die_die ( int  retval  ) 

This routine causes process death.

Some signal handler problems got in the way of abort before, so this is an overzealous and somewhat amusing implementation.

Definition at line 41 of file ink_error.cc.

Referenced by ink_fatal_va(), and ink_pfatal().

void ink_dprintf ( int  debug_level,
const char *  message_format,
  ... 
)

This routine prints/logs a message given the printf format string in message_format, and the optional arguments.

Definition at line 224 of file ink_error.cc.

References ink_dprintf_level.

void ink_eprintf ( const char *  message_format,
  ... 
)

This routine prints/logs a message given the printf format string in message_format, and the optional arguments.

Definition at line 187 of file ink_error.cc.

void ink_error ( const char *  message_format,
  ... 
)

This routine prints/logs a warning message given the printf format string in message_format, and the optional arguments.

Definition at line 204 of file ink_error.cc.

Referenced by Layout::Layout(), layout_relative(), HttpTransact::perform_accept_encoding_filtering(), Layout::relative(), and Layout::relative_to().

void ink_fatal ( int  return_code,
const char *  message_format,
  ... 
)
void ink_fatal_die ( const char *  message_format,
  ... 
)

Definition at line 80 of file ink_error.cc.

References ink_fatal_va().

Referenced by change_uid_gid().

void ink_fatal_va ( int  return_code,
const char *  fmt,
va_list  ap 
)

This routine prints/logs an error message given the printf format string in message_format, and the optional arguments.

The program is then terminated with return_code.

Definition at line 55 of file ink_error.cc.

References ink_die_die_die(), and ink_stack_trace_dump().

Referenced by Diags::error_va(), ink_fatal(), and ink_fatal_die().

void ink_notice ( const char *  message_format,
  ... 
)

This routine prints/logs a notice message given the printf format string in message_format, and the optional arguments.

Definition at line 167 of file ink_error.cc.

void ink_pfatal ( int  return_code,
const char *  message_format,
  ... 
)

This routine prints/logs an error message given the printf format string in message_format, and the optional arguments.

The current errno is also printed. The program is then terminated with return_code.

Definition at line 95 of file ink_error.cc.

References ink_die_die_die(), and ink_stack_trace_dump().

void ink_pwarning ( const char *  message_format,
  ... 
)

This routine prints/logs a warning message given the printf format string in message_format, and the optional arguments.

The current errno is also printed.

Definition at line 143 of file ink_error.cc.

int ink_set_dprintf_level ( int  debug_level  ) 

Set output level for ink_dprintf() function.

For debugging purposes only!

Definition at line 243 of file ink_error.cc.

References ink_dprintf_level.

Referenced by main().

void ink_warning ( const char *  message_format,
  ... 
)

This routine prints/logs a warning message given the printf format string in message_format, and the optional arguments.

Definition at line 122 of file ink_error.cc.


Variable Documentation

int ink_dprintf_level = 0 [static]

Definition at line 32 of file ink_error.cc.

Referenced by ink_dprintf(), and ink_set_dprintf_level().