On Wednesday, November 6, 2019 at 9:36:34 PM UTC-8, Velu Narasimman wrote: > > I used that statement inside of a plugin. I am managing multiple > Environments(projects) here. So I used the generic logging form like, > *self.log.debug("write > this to log file") . * > > In some other places due to the need I imported the environment > specifically like this, > > > * from trac.env import Environment * > * current_env = Environment("/path/to/environment") # environment is a > Project* > * current_env.log.debug("Some text to the log file")* > > I have used this second method at many places. >
If run that code that from the command line, I assume only one log line will be written. If that's true, then there is likely an issue with your web server configuration that is leading to the request being processed multiple times. I assume that is related to the slowness. Sharing your web server configuration may be a good next step. It's strange you would need to construct an Environment instance in a plugin, since it can be accessed in a Component instance as self.env. In the rare instance that it's necessary you probably want to use "open_environment" from trac.env, with use_cache=True. https://www.edgewall.org/docs/branches-1.2-stable/html/api/trac_env.html#functions You may want to temporarily disable your plugins and see if the duplicate logging ceases. Some of your plugins may not be implemented correctly. - Ryan -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to trac-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/trac-users/7864d328-3b1d-460e-84c5-1003cafdbbdf%40googlegroups.com.