We want to construct a logger that logs in the context of the class to which
it is attached, and doesn't require interception, as we don't want control
flow logging, just logging that tells us which class its from.  This is a
relatively high perf requirement system so we'd like that information to get
put in at creation of the graph, not determined by reflection on each call
to a log method...  is there a better way to do this?
On Mar 7, 2011 10:10 AM, "Krzysztof Koźmic" <[email protected]>
wrote:
> CreationContext keeps track of that internally but I don't think it
> exposes this to the outside world...
>
> Why do you need that again?
>
> Krzysztof
>
>
> On 07/03/2011 7:59 PM, Kelly Leahy wrote:
>> Krzysztof, thanks for the reply... it seems that handler had the name
>> of the root object being passed to resolve. I'm looking for the
>> immediate dependency (I.e. the class whose ctor requested the
>> component). Is there some way to know the immediate dependent class?
>>
>> On Mar 7, 8:29 am, Krzysztof Koźmic<[email protected]>
>> wrote:
>>> context.Handler has that information
>>>
>>> On 07/03/2011 5:23 PM, Kelly Leahy wrote:
>>>
>>>
>>>
>>>
>>>
>>>> Sorry... was trying to send this from my phone and it sent
>>>> prematurely. Anyway, the problem we seem to be having is that I
>>>> can't seem to find the name of the dependency class anywhere in the
>>>> context, model, or kernel arguments that can be passed to the factory
>>>> method. It seems I should be able to get the dependent class name
>>>> from the extended properties on the context, but I haven't been able
>>>> to figure out how to construct / find the key I need to pass to read
>>>> the extended property (it looks like I need to ask for the component
>>>> activator but I don't know how).
>>>> Can anyone shed some light on this?
>>>> On Mar 7, 2011 12:15 AM, "Kelly Leahy"<[email protected]
>>>> <mailto:[email protected]>> wrote:
>>>>> So, I'm a bit drunk so I apologize if this makes little sense, but
>>>>> we're trying to build a factory method (UseFactoryMethod) to pass the
>>>>> name of the calling dependency to the factory ctor. We want to use
>>>>> this for logging the name of the dependency as the source of our log
>>>>> messages, but we're not ready to use castle logging yet :(
>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Castle Project Development List" group.
>>>> To post to this group, send email to
>>>> [email protected].
>>>> To unsubscribe from this group, send email to
>>>> [email protected].
>>>> For more options, visit this group at
>>>> http://groups.google.com/group/castle-project-devel?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
"Castle Project Development List" group.
> To post to this group, send email to [email protected]
.
> To unsubscribe from this group, send email to
[email protected].
> For more options, visit this group at
http://groups.google.com/group/castle-project-devel?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Castle Project Development List" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/castle-project-devel?hl=en.

Reply via email to