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.


[cid:edfd8ca1-89a4-453e-b6f2-1ca8495dc2f5]


Velu Narasimman  |  Engineer, Information Systems

Mobile: +91-44-6740 400  |  Phone: +91-44-6740 4000  |  Extn. 11535 |


Website: www.aspiresys.com<http://www.aspiresys.com/> | Blog: 
http://blog.aspiresys.com<http://blog.aspiresys.com/>

[cid:fdefb035-efa9-4850-929f-250aa84d46ba] 
[cid:a0f8c499-0d8f-45cc-9b95-c9f7b469d518]  
[cid:ddc37235-b7bb-46eb-8b1a-8b444b9d5988]  
[cid:9b7acf50-f89d-4649-bbf4-0ca496d9f2ba]

India’s Best Companies to Work for 2019!








________________________________
From: Ryan Ollos <rjol...@gmail.com>
Sent: Thursday, November 7, 2019 10:47 AM
To: Velu Narasimman <velu.narasim...@aspiresys.com>
Cc: RjOllos <rjol...@gmail.com>; Trac Users <trac-users@googlegroups.com>
Subject: Re: [Trac] Why am I seeing a lot of repeated log lines in trac.log?

CAUTION: External email. Please verify the veracity of the sender/content 
before opening a link or an attachment.


On Wed, Nov 6, 2019 at 9:07 PM Velu Narasimman 
<velu.narasim...@aspiresys.com<mailto:velu.narasim...@aspiresys.com>> wrote:
Yes you are correct. I used Environment.log.debug("some text") line to print to 
the log file

You did that from a terminal? Or inserted the statement into a plugin? If 
plugin, was it an interface such as IRequestFilter.pre_process_request or 
IRequestFilter.post_process_request?

- Ryan
[Aspire Systems]

This e-mail message and any attachments are for the sole use of the intended 
recipient(s) and may contain proprietary, confidential, trade secret or 
privileged information. Any unauthorized review, use, disclosure or 
distribution is prohibited and may be a violation of law. If you are not the 
intended recipient, please contact the sender by reply e-mail and destroy all 
copies of the original message.

-- 
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/SG2PR02MB2921D14BF2307B8B0A8E2C21FD780%40SG2PR02MB2921.apcprd02.prod.outlook.com.

Reply via email to