Session ID in logger_format
Hello, fellow dancers! Would it be possible (at least in Dancer 2) to add the session id to the logger_format options? That is really helpful if you try to trace a problem / crash in your application. Regards Racke -- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team
I think this is useful. Is it always/easy possible to recover the session_id? Obviously not when there is no session engine used :) Le lundi 24 septembre 2012 à 09:06, Stefan Hornburg (Racke) a écrit :
Hello, fellow dancers!
Would it be possible (at least in Dancer 2) to add the session id to the logger_format options?
That is really helpful if you try to trace a problem / crash in your application.
Regards Racke
-- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team
_______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
On 09/24/2012 11:56 AM, Damien Krotkine wrote:
I think this is useful. Is it always/easy possible to recover the session_id? Obviously not when there is no session engine used :)
We could look up if session is set in the configuration - or introduce a method to determine whether sessions are enabled. Regards Racke -- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team
There is already a way to know if there is a session engine and which one it is. However I don't know if the session id is always stored the same way in every engines. I need to check if there is a session_id accessor in the Session engine base class. That would be the best way to generically get it in the logger I think Le lundi 24 septembre 2012 à 12:01, Stefan Hornburg (Racke) a écrit :
On 09/24/2012 11:56 AM, Damien Krotkine wrote:
I think this is useful. Is it always/easy possible to recover the session_id? Obviously not when there is no session engine used :)
We could look up if session is set in the configuration - or introduce a method to determine whether sessions are enabled.
Regards Racke
-- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team
_______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
On 09/24/2012 12:08 PM, Damien Krotkine wrote:
There is already a way to know if there is a session engine and which one it is. However I don't know if the session id is always stored the same way in every engines. I need to check if there is a session_id accessor in the Session engine base class. That would be the best way to generically get it in the logger I think
Dancer::Session::Abstract has an id attribute, this should be good enough for our purpose. Regards Racke -- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team
Indeed! Coll then I'm in favor of adding the session I'd in the default log format. I think that can be added to dancer 1 as well. Now you need more deva to agree and come to a consensus :) A pull request would be even better :) Le lundi 24 septembre 2012 à 12:13, Stefan Hornburg (Racke) a écrit :
On 09/24/2012 12:08 PM, Damien Krotkine wrote:
There is already a way to know if there is a session engine and which one it is. However I don't know if the session id is always stored the same way in every engines.
I need to check if there is a session_id accessor in the Session engine base class. That would be the best way to generically get it in the logger I think
Dancer::Session::Abstract has an id attribute, this should be good enough for our purpose.
Regards Racke
-- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team
Would it be better to give plugins the ability to pass arbitrary information to the logger (or instructions for retrieving information from the plugin?) which can be retrieved with some sort of keyword call in the logger format like session_id, or is that excessive? Daniel From: Damien Krotkine <dkrotkine@gmail.com> To: "Stefan Hornburg (Racke)" <racke@linuxia.de> Cc: "dancer-users@perldancer.org" <dancer-users@perldancer.org> Date: 24/09/2012 11:09 Subject: [Dancer-users] Re : Re : Session ID in logger_format Sent by: dancer-users-bounces@perldancer.org There is already a way to know if there is a session engine and which one it is. However I don't know if the session id is always stored the same way in every engines. I need to check if there is a session_id accessor in the Session engine base class. That would be the best way to generically get it in the logger I think Le lundi 24 septembre 2012 à 12:01, Stefan Hornburg (Racke) a écrit : On 09/24/2012 11:56 AM, Damien Krotkine wrote: I think this is useful. Is it always/easy possible to recover the session_id? Obviously not when there is no session engine used :) We could look up if session is set in the configuration - or introduce a method to determine whether sessions are enabled. Regards Racke -- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
I think that is excessive for Dancer 1. However for Dancer 2, it's very doable. Le lundi 24 septembre 2012 à 12:16, Daniel Perrett a écrit :
Would it be better to give plugins the ability to pass arbitrary information to the logger (or instructions for retrieving information from the plugin?) which can be retrieved with some sort of keyword call in the logger format like session_id, or is that excessive?
Daniel
From: Damien Krotkine <dkrotkine@gmail.com> To: "Stefan Hornburg (Racke)" <racke@linuxia.de> Cc: "dancer-users@perldancer.org" <dancer-users@perldancer.org> Date: 24/09/2012 11:09 Subject: [Dancer-users] Re : Re : Session ID in logger_format Sent by: dancer-users-bounces@perldancer.org
There is already a way to know if there is a session engine and which one it is. However I don't know if the session id is always stored the same way in every engines. I need to check if there is a session_id accessor in the Session engine base class. That would be the best way to generically get it in the logger I think Le lundi 24 septembre 2012 à 12:01, Stefan Hornburg (Racke) a écrit : On 09/24/2012 11:56 AM, Damien Krotkine wrote:
I think this is useful. Is it always/easy possible to recover the session_id? Obviously not when there is no session engine used :)
We could look up if session is set in the configuration - or introduce a method to determine whether sessions are enabled.
Regards Racke
-- LinuXia Systems => http://www.linuxia.de/ Expert Interchange Consulting and System Administration ICDEVGROUP => http://www.icdevgroup.org/ Interchange Development Team
_______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users _______________________________________________ Dancer-users mailing list Dancer-users@perldancer.org http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
participants (3)
-
Damien Krotkine -
Daniel Perrett -
Stefan Hornburg (Racke)