dubbo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khanimteyaz (GitHub) <git...@apache.org>
Subject [GitHub] [incubator-dubbo] khanimteyaz commented on issue #3027: Simple date format each time new object creation removed
Date Wed, 26 Dec 2018 08:10:12 GMT
> @khanimteyaz
> Hi,
> I have not found a LogTask in AccessLogFilter before. After I looked at the code, I personally
thought that it would be fine to put all the log output into the LogTask.
It make sense writing to log through this thread, but just to confirm you mean writing to
log only, not the log message creation part?
> 
> I think we can use the newSingleThreadScheduledExecutor to create a timed task. This
way we can just create a SimpleDateFormat once (bind to a LogTask).
> How do u think?
Performing all write through single instance by **newSingleThreadScheduledExecutor ** is good
approach and I am with you on this, only thing which is stoping me how in the case of writing
pending log message in case of jvm shutdown. I think jdk provide a way for this and using
the **scheduleWithFixedDelay** of **ScheduledExecutorService**. 

@carryxyh 
  Do you feel, the approach I am taking is right or would you suggest me something else here
on the implementation?


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3027 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


Mime
View raw message