diff options
author | mjb2 <mjb2@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-22 20:04:14 +0000 |
---|---|---|
committer | mjb2 <mjb2@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-07-22 20:04:14 +0000 |
commit | c428bfa55c39518c75f1a5291504e0d51ac16d7c (patch) | |
tree | 68f19704d2fcdb84f3c8536d0979f4d504143aca | |
parent | 602e8324a193b7b167bf925618d46de41d3a9101 (diff) | |
download | ATCD-c428bfa55c39518c75f1a5291504e0d51ac16d7c.tar.gz |
See Wed Jul 22 15:00:00 1998 Matthew J Braun <mjb2@cec.wustl.edu>
-rw-r--r-- | TAO/orbsvcs/orbsvcs/Log/Logger_i.cpp | 19 | ||||
-rw-r--r-- | TAO/orbsvcs/tests/Logger/client_i.cpp | 4 |
2 files changed, 16 insertions, 7 deletions
diff --git a/TAO/orbsvcs/orbsvcs/Log/Logger_i.cpp b/TAO/orbsvcs/orbsvcs/Log/Logger_i.cpp index d0d8a004fc8..46c3052e1ea 100644 --- a/TAO/orbsvcs/orbsvcs/Log/Logger_i.cpp +++ b/TAO/orbsvcs/orbsvcs/Log/Logger_i.cpp @@ -54,8 +54,19 @@ Logger_i::priority_conversion (Logger::Log_Priority priority) u_long Logger_i::verbosity_conversion (Logger::Verbosity_Level verbosity_level) { - u_long pval = ACE_static_cast (int, verbosity_level); - return 1 << pval; + // This isn't very elegant, but it's because there's no simple + // mapping from <Logger::Verbosity_Level>'s to the verbosity flags + // specified in <ace/Log_Msg.h> + switch (verbosity_level) + { + case Logger::SILENT: + return 040; + case Logger::VERBOSE_LITE: + return 020; + default: + case Logger::VERBOSE: + return 010; + } } void @@ -99,9 +110,11 @@ Logger_i::log (const Logger::Log_Record &log_rec, ASYS_TCHAR namebuf[MAXHOSTNAMELEN + 1]; addy.get_host_name (namebuf, MAXHOSTNAMELEN); + + u_long verb_level = this->verbosity_conversion (this->verbosity_level_); rec.print (namebuf, - this->verbosity_conversion (this->verbosity_level_), + verb_level, stderr); // Print out the logging message to stderr with the given level of // verbosity diff --git a/TAO/orbsvcs/tests/Logger/client_i.cpp b/TAO/orbsvcs/tests/Logger/client_i.cpp index 39f92b7737d..cbdb5635554 100644 --- a/TAO/orbsvcs/tests/Logger/client_i.cpp +++ b/TAO/orbsvcs/tests/Logger/client_i.cpp @@ -161,10 +161,6 @@ Logger_Client::run (void) { TAO_TRY { - // @@ Matt, for fun, you might try having an array of - // Log_Records (e.g., of size 2 to start out with) and then put - // the following code in a loop. - // Create 2 Log_Records for the test Logger::Log_Record rec1; Logger::Log_Record rec2; |