Log: Fix a regression in handling log options

The channel refactor introduced a regression where we were not honoring
the log options passed when enabling the channel. Fix that and add a
test.

llvm-svn: 296329
diff --git a/lldb/source/Core/Log.cpp b/lldb/source/Core/Log.cpp
index 24d7ce3..89216f4 100644
--- a/lldb/source/Core/Log.cpp
+++ b/lldb/source/Core/Log.cpp
@@ -89,9 +89,10 @@
 
 void Log::Channel::Enable(Log &log,
                           const std::shared_ptr<llvm::raw_ostream> &stream_sp,
-                          uint32_t flags) {
+                          uint32_t options, uint32_t flags) {
   log.GetMask().Set(flags);
   if (log.GetMask().Get()) {
+    log.GetOptions().Set(options);
     log.SetStream(stream_sp);
     log_ptr.store(&log, std::memory_order_release);
   }
@@ -283,7 +284,8 @@
   uint32_t flags = categories && categories[0]
                        ? GetFlags(error_stream, *iter, categories)
                        : iter->second.channel.default_flags;
-  iter->second.channel.Enable(iter->second.log, log_stream_sp, flags);
+  iter->second.channel.Enable(iter->second.log, log_stream_sp, log_options,
+                              flags);
   return true;
 }