summaryrefslogtreecommitdiff
path: root/netsvcs
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1999-07-16 19:21:04 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1999-07-16 19:21:04 +0000
commitb427b0e6b722eda21d1c4d6eb970d419245a7fe1 (patch)
tree9eed1af4eab7f873e9a1ece7a0ece84da177a9b8 /netsvcs
parent85dd6692658e2e2397908b5a8ef16e2274a27c2c (diff)
downloadATCD-b427b0e6b722eda21d1c4d6eb970d419245a7fe1.tar.gz
ChangeLogTag:Fri Jul 16 13:55:34 1999 Douglas C. Schmidt <schmidt@tango.cs.wustl.edu>
Diffstat (limited to 'netsvcs')
-rw-r--r--netsvcs/lib/Client_Logging_Handler.cpp6
-rw-r--r--netsvcs/lib/Log_Message_Receiver.cpp16
-rw-r--r--netsvcs/lib/Logging_Strategy.cpp24
3 files changed, 30 insertions, 16 deletions
diff --git a/netsvcs/lib/Client_Logging_Handler.cpp b/netsvcs/lib/Client_Logging_Handler.cpp
index 5cc31341df3..0fc8fa295b3 100644
--- a/netsvcs/lib/Client_Logging_Handler.cpp
+++ b/netsvcs/lib/Client_Logging_Handler.cpp
@@ -216,7 +216,9 @@ int
ACE_Client_Logging_Handler::send (ACE_Log_Record &log_record)
{
if (this->logging_output_ == ACE_STDERR)
- log_record.print ("<localhost>", 0, stderr);
+ log_record.print ("<localhost>",
+ ACE_Log_Msg::instance ()->flags (),
+ stderr);
else
{
long len = log_record.length ();
@@ -236,7 +238,7 @@ ACE_Client_Logging_Handler::send (ACE_Log_Record &log_record)
if (orig_ostream)
log_record.print ("<localhost>",
- 0,
+ ACE_Log_Msg::instance ()->flags (),
*orig_ostream);
return 0;
}
diff --git a/netsvcs/lib/Log_Message_Receiver.cpp b/netsvcs/lib/Log_Message_Receiver.cpp
index e9e6cf4812e..0a10a735988 100644
--- a/netsvcs/lib/Log_Message_Receiver.cpp
+++ b/netsvcs/lib/Log_Message_Receiver.cpp
@@ -19,7 +19,9 @@ Static_Log_Message_Receiver<ACE_SYNCH_USE>::log_record (char const *hostname,
ACE_GUARD (ACE_SYNCH_MUTEX_T, guard, lock_);
#endif /* ACE_HAS_THREADS */
- record.print (hostname, 0, stderr);
+ record.print (hostname,
+ ACE_Log_Msg::instance ()->flags (),
+ stderr);
}
template<ACE_SYNCH_DECL> void
@@ -33,7 +35,9 @@ Static_Log_Message_Receiver<ACE_SYNCH_USE>::log_output (char const *hostname,
static ACE_SYNCH_MUTEX_T lock_;
ACE_GUARD (ACE_SYNCH_MUTEX_T, guard, lock_);
#endif /* ACE_HAS_THREADS */
- record.print (hostname, 0, *outputfile);
+ record.print (hostname,
+ ACE_Log_Msg::instance ()->flags (),
+ *outputfile);
}
}
@@ -98,7 +102,9 @@ Log_Message_Receiver_Impl<ACE_SYNCH_USE>::log_record (char const *hostname,
ACE_Log_Record &record)
{
ACE_MT (ACE_GUARD (ACE_SYNCH_MUTEX_T, guard, print_lock_));
- record.print (hostname, 0, stderr);
+ record.print (hostname,
+ ACE_Log_Msg::instance ()->flags (),
+ stderr);
}
template<ACE_SYNCH_DECL> void
@@ -109,7 +115,9 @@ Log_Message_Receiver_Impl<ACE_SYNCH_USE>::log_output (char const *hostname,
if (outputfile != 0)
{
ACE_MT (ACE_GUARD (ACE_SYNCH_MUTEX_T, guard, print_lock_));
- record.print (hostname, 0, *outputfile);
+ record.print (hostname,
+ ACE_Log_Msg::instance ()->flags (),
+ *outputfile);
}
}
diff --git a/netsvcs/lib/Logging_Strategy.cpp b/netsvcs/lib/Logging_Strategy.cpp
index d0e045e2f18..fa70edf850e 100644
--- a/netsvcs/lib/Logging_Strategy.cpp
+++ b/netsvcs/lib/Logging_Strategy.cpp
@@ -24,6 +24,8 @@ ACE_Logging_Strategy::tokenize (char *flag_string)
ACE_SET_BITS (this->flags_, ACE_Log_Msg::OSTREAM);
else if (ACE_OS::strcmp (flag, "VERBOSE") == 0)
ACE_SET_BITS (this->flags_, ACE_Log_Msg::VERBOSE);
+ else if (ACE_OS::strcmp (flag, "VERBOSE_LITE") == 0)
+ ACE_SET_BITS (this->flags_, ACE_Log_Msg::VERBOSE_LITE);
else if (ACE_OS::strcmp (flag, "SILENT") == 0)
ACE_SET_BITS (this->flags_, ACE_Log_Msg::SILENT);
}
@@ -38,8 +40,6 @@ ACE_Logging_Strategy::parse_args (int argc, char *argv[])
this->flags_ = 0;
this->filename_ = ACE_DEFAULT_LOGFILE;
- ACE_LOG_MSG->open ("Logging_Strategy");
-
ACE_Get_Opt get_opt (argc, argv, "f:s:", 0);
for (int c; (c = get_opt ()) != -1; )
@@ -76,22 +76,26 @@ ACE_Logging_Strategy::init (int argc, char *argv[])
if (this->flags_ != 0)
{
// Clear all flags
- ACE_Log_Msg::instance()->clr_flags (ACE_Log_Msg::STDERR |
- ACE_Log_Msg::LOGGER |
- ACE_Log_Msg::OSTREAM |
- ACE_Log_Msg::VERBOSE |
- ACE_Log_Msg::SILENT);
+ ACE_Log_Msg::instance()->clr_flags (ACE_Log_Msg::STDERR
+ | ACE_Log_Msg::LOGGER
+ | ACE_Log_Msg::OSTREAM
+ | ACE_Log_Msg::VERBOSE
+ | ACE_Log_Msg::VERBOSE_LITE
+ | ACE_Log_Msg::SILENT);
// Check if OSTREAM bit is set
- if (ACE_BIT_ENABLED (this->flags_, ACE_Log_Msg::OSTREAM))
+ if (ACE_BIT_ENABLED (this->flags_,
+ ACE_Log_Msg::OSTREAM))
{
// Create a new ofstream to direct output to the file
- ofstream *output_file = new ofstream (this->filename_);
+ ofstream *output_file =
+ new ofstream (this->filename_);
ACE_Log_Msg::instance()->msg_ostream (output_file);
}
// Now set the flags for Log_Msg
ACE_Log_Msg::instance()->set_flags (this->flags_);
}
- return 0;
+
+ return ACE_LOG_MSG->open ("Logging_Strategy");
}
// The following is a "Factory" used by the ACE_Service_Config and