[ 
https://issues.apache.org/jira/browse/TS-3749?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14648417#comment-14648417
 ] 

Leif Hedstrom commented on TS-3749:
-----------------------------------

Almost :) With a few modifications, it works again:

{code}
diff --git a/proxy/logging/LogConfig.cc b/proxy/logging/LogConfig.cc
index aa5d160..ee4273d 100644
--- a/proxy/logging/LogConfig.cc
+++ b/proxy/logging/LogConfig.cc
@@ -446,7 +446,24 @@ LogConfig::init(LogConfig *prev_config)
   }

   // ----------------------------------------------------------------------
-  Log::error_log = NULL;
+  // Construct a new error log object candidate.
+  if (Log::error_logging_enabled()) {
+    LogFormat *fmt;
+
+    Debug("log", "creating predefined error log object");
+
+    fmt = MakeTextLogFormat("error");
+    this->global_format_list.add(fmt, false);
+    errlog = new LogObject(fmt, logfile_dir, "error.log", LOG_FILE_ASCII, 
NULL, (Log::RollingEnabledValues)rolling_enabled,
+                      collation_preproc_threads, rolling_interval_sec, 
rolling_offset_hr, rolling_size_mb);
+    errlog->set_fmt_timestamps();
+    if (log_object_manager.manage_object(errlog) != 
LogObjectManager::NO_FILENAME_CONFLICTS) {
+      delete errlog;
+      errlog = NULL;
+    }
+  } else {
+    Log::error_log = NULL;
+  }

   if (prev_config) {
     // Transfer objects from previous configuration.
{code}

> Error log isn't recorded
> ------------------------
>
>                 Key: TS-3749
>                 URL: https://issues.apache.org/jira/browse/TS-3749
>             Project: Traffic Server
>          Issue Type: Bug
>          Components: Logging
>            Reporter: Ryo Okubo
>            Assignee: Crystal Qian
>            Priority: Blocker
>             Fix For: 6.0.0
>
>
> error.log has not been recorded after TS-1985. Enabling error logging and 
> specifying a format of error.log depended on pre-defined log format but this 
> logic was eliminated on the issue.
> Error logging works fine when  I tried to revert 
> [5c2b032fb9f8f05ae7be1794a3103140ffe7d07e|https://github.com/apache/trafficserver/commit/5c2b032fb9f8f05ae7be1794a3103140ffe7d07e].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to