⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logger.idl

📁 这是广泛使用的通信开源项目,对于大容量,高并发的通讯要求完全能够胜任,他广泛可用于网络游戏医学图像网关的高qos要求.更详细的内容可阅读相应的材料
💻 IDL
字号:
// Logger.idl,v 1.2 2003/12/10 10:06:34 jwillemsen Exp

#ifndef TAO_LOGGER_IDL
#define TAO_LOGGER_IDL

// TAO_MAXLOGMSGLEN must be the same size as ACE_MAXLOGMSGLEN.
#if !defined TAO_MAXLOGMSGLEN
#define TAO_MAXLOGMSGLEN 4 * 1024
#endif /* TAO_MAXLOGMSGLEN */

interface Logger
{
  // = TITLE
  //   Used to log messages to a logging server.
  //
  // = DESCRIPTION
  //   This implementation provides a CORBA wrapper around the
  //   <ACE_Log_Msg> mechanism.

  enum Log_Priority
  {

    LM_SHUTDOWN,
    // Shutdown the logger

    LM_TRACE,
    // Messages indicating function-calling sequence

    LM_DEBUG,
    // Messages that contain information normally of use only when
    // debugging a program

    LM_INFO,
    // Informational messages

    LM_NOTICE,
    // Conditions that are not error conditions, but that may require
    // special handling

    LM_WARNING,
    // Warning messages

    LM_STARTUP,
    // Initialize the logger

    LM_ERROR,
    // Error messages

    LM_CRITICAL,
    // Critical conditions, such as hard device errors

    LM_ALERT,
    // A condition that should be corrected immediately, such as a
    // corrupted system database

    LM_EMERGENCY,
    // A panic condition.  This is normally broadcast to all users

    LM_MAX
    // In <ACE_Log_Priority>, LM_MAX is aliased to LM_EMERGENCY rather than
    // being a distinct tag, but that is invalid IDL syntax.  We
    // adjust for this internally.
  };

  enum Verbosity_Level
  {
    VERBOSE,
    // Display messages in a verbose manner.

    VERBOSE_LITE,
    // Display messages in a less verbose manner (i.e., only print
    // information that can change between calls).

    SILENT
    // Do not print messages at all (just leave in thread-specific
    // storage for later inspection).
  };

  struct Log_Record
  {
    Log_Priority type;                 // Type of logging message.
    long time;                         // Timestamp of the sender.
    long app_id;                       // Process id of the sender.
    long host_addr;	               // IP address of the sender.
    string<TAO_MAXLOGMSGLEN> msg_data; // The logging message.
  };

  oneway void log (in Log_Record log_rec);
  // Transmit a Log_Record to the logging server.

  oneway void logv (in Log_Record log_rec,
		    in Verbosity_Level level);
  // Log a message with a specific Verbosity level which may be
  // differeny from the <verbosity_level>

  void log_twoway (in Log_Record log_rec);
  // Like log (), but twoway such that applications will block until
  // log messages are recieved by the logger

  void logv_twoway (in Log_Record log_rec,
		    in Verbosity_Level level);
  // Like logv (), but twoway for the same reason as logv_twoway ()

  oneway void verbosity (in Verbosity_Level level);
  // Change the state of the <verbosity_level>.  This controls how
  // much logging information is displayed by the server.
};

interface Logger_Factory
{
  // = TITLE
  //   Create a <Logger> of type <name>.

  Logger make_logger (in string name);
  // Returns a new <Logger> instance if <name> is unique, or retuns a
  // previously created instance of that name
};

#endif /* TAO_LOGGER_IDL */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -