Re: [BangPypers] Django How to log used_id with log message.

2016-06-14 Thread Sanu Madhavan
thanks Anand,
I don't want repeat request.user.id in all log statements in the view.
I am looking for a generalized way.

-- 




 <<::Regards ::>>
sanup...@gmail.com
  +917736579488
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers


Re: [BangPypers] Django How to log used_id with log message.

2016-06-14 Thread Chillar Anand
>From where you are logging?

If you are logging from view, you can try `request.user.id`.
If you don't have request object, you can store user object somewhere and
log from that.

Regards,
Chillar Anand
www.avilpage.com


On Tue, Jun 14, 2016 at 8:50 PM, Sanu Madhavan  wrote:

> Hi,
> I am following django doc
> https://docs.djangoproject.com/en/1.9/topics/logging/
> I could not find an option to log user_id with log message.
> How you guys are doing it ?.
>
>
>
> --
>
>
>
>
>  <<::Regards ::>>
> sanup...@gmail.com
>   +917736579488
> ___
> BangPypers mailing list
> BangPypers@python.org
> https://mail.python.org/mailman/listinfo/bangpypers
>
___
BangPypers mailing list
BangPypers@python.org
https://mail.python.org/mailman/listinfo/bangpypers