Changes to attempt to silence bcc64x
[ACE_TAO.git] / TAO / examples / Logging / Logger.idl
blobb1cdfd31a95975af0264e60145f5fe3bdd4d725e
1 #ifndef TAO_LOGGER_IDL
2 #define TAO_LOGGER_IDL
4 // TAO_MAXLOGMSGLEN must be the same size as ACE_MAXLOGMSGLEN.
5 #if !defined TAO_MAXLOGMSGLEN
6 #define TAO_MAXLOGMSGLEN 4 * 1024
7 #endif /* TAO_MAXLOGMSGLEN */
9 typedef string<TAO_MAXLOGMSGLEN> TAO_log_string;
10 interface Logger
12 // = TITLE
13 // Used to log messages to a logging server.
15 // = DESCRIPTION
16 // This implementation provides a CORBA wrapper around the
17 // <ACE_Log_Msg> mechanism.
19 enum Log_Priority
22 LM_SHUTDOWN,
23 // Shutdown the logger
25 LM_TRACE,
26 // Messages indicating function-calling sequence
28 LM_DEBUG,
29 // Messages that contain information normally of use only when
30 // debugging a program
32 LM_INFO,
33 // Informational messages
35 LM_NOTICE,
36 // Conditions that are not error conditions, but that may require
37 // special handling
39 LM_WARNING,
40 // Warning messages
42 LM_STARTUP,
43 // Initialize the logger
45 LM_ERROR,
46 // Error messages
48 LM_CRITICAL,
49 // Critical conditions, such as hard device errors
51 LM_ALERT,
52 // A condition that should be corrected immediately, such as a
53 // corrupted system database
55 LM_EMERGENCY,
56 // A panic condition. This is normally broadcast to all users
58 LM_MAX
59 // In <ACE_Log_Priority>, LM_MAX is aliased to LM_EMERGENCY rather than
60 // being a distinct tag, but that is invalid IDL syntax. We
61 // adjust for this internally.
64 enum Verbosity_Level
66 VERBOSE,
67 // Display messages in a verbose manner.
69 VERBOSE_LITE,
70 // Display messages in a less verbose manner (i.e., only print
71 // information that can change between calls).
73 SILENT
74 // Do not print messages at all (just leave in thread-specific
75 // storage for later inspection).
78 struct Log_Record
80 Log_Priority type; // Type of logging message.
81 long time; // Timestamp of the sender.
82 long app_id; // Process id of the sender.
83 long host_addr; // IP address of the sender.
84 TAO_log_string msg_data; // The logging message.
87 oneway void log (in Log_Record log_rec);
88 // Transmit a Log_Record to the logging server.
90 oneway void logv (in Log_Record log_rec,
91 in Verbosity_Level level);
92 // Log a message with a specific Verbosity level which may be
93 // differeny from the <verbosity_level>
95 void log_twoway (in Log_Record log_rec);
96 // Like log (), but twoway such that applications will block until
97 // log messages are received by the logger
99 void logv_twoway (in Log_Record log_rec,
100 in Verbosity_Level level);
101 // Like logv (), but twoway for the same reason as logv_twoway ()
103 oneway void verbosity (in Verbosity_Level level);
104 // Change the state of the <verbosity_level>. This controls how
105 // much logging information is displayed by the server.
108 interface Logger_Factory
110 // = TITLE
111 // Create a <Logger> of type <name>.
113 Logger make_logger (in string name);
114 // Returns a new <Logger> instance if <name> is unique, or retuns a
115 // previously created instance of that name
118 #endif /* TAO_LOGGER_IDL */