Is someone working with Log4s?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Is someone working with Log4s?

hernanmd
Because there is a missing method (#currentClassAndMethod) and author didn't replied. Maybe I am using it wrong

EsLogManager runForever: '[log4s]
debugEnabled=''true''
quietMode=''false''
globalLevel=''All''
;runForever=()
;runForever=''75'', ''7''
dailyRollingFileAppender=''TestDailyRollingFileAppender'', ''root'', ''dallyRollingFileTopOfDay.log'',  ''false'', ''All'', '''', ''%-15d [dailyRollingFileAppenderTopOfDay]  %-16m'', ''true'',  ''topOfDay''
'

Cheers,

Hernán

Reply | Threaded
Open this post in threaded view
|

Re: Is someone working with Log4s?

jtuchel
#currentClassAndMethod is VAST specific. It was added to VAST for log4s,
afaik.
I am quite sure Donald is interested in hearing about your problems with
it. Did you contact him just the other day or some time ago?

Joachim

Am 27.12.13 10:53, schrieb Hernán Morales Durand:

> Because there is a missing method (#currentClassAndMethod) and author
> didn't replied. Maybe I am using it wrong
>
> EsLogManager runForever: '[log4s]
> debugEnabled=''true''
> quietMode=''false''
> globalLevel=''All''
> ;runForever=()
> ;runForever=''75'', ''7''
> dailyRollingFileAppender=''TestDailyRollingFileAppender'', ''root'',
> ''dallyRollingFileTopOfDay.log'',  ''false'', ''All'', '''', ''%-15d
> [dailyRollingFileAppenderTopOfDay] %-16m'', ''true'',  ''topOfDay''
> '
>
> Cheers,
>
> Hernán
>


--
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:[hidden email]
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1


Reply | Threaded
Open this post in threaded view
|

Re: Is someone working with Log4s?

dmacq
In reply to this post by hernanmd
Hernan,

The Visual Smalltalk method is this:

currentClassAndMethod

        ^Association
                key: self class name asString
                value: (Processor activeProcess methodAtFrame: 1) selector asString

I think the Pharo equivalent would be this:

currentClassAndMethod

        ^Association
                key: self class name asString
                value: Processor activeProcess name

Donald [|]
Reply | Threaded
Open this post in threaded view
|

Re: Is someone working with Log4s?

dmacq
What I posted before just gets the name of the process, not the name of the method that is currently executing.  I don't know how to do that off the top of my head, but I will look into it this weekend.

Suggestions welcome.

Donald [|]
Reply | Threaded
Open this post in threaded view
|

Re: Is someone working with Log4s?

hernanmd
Do not have a copy of VAST or VisualSmalltalk now but this could make it:

currentClassAndMethod

        ^Association
                key: self class name asString
                value: thisContext method selector


Hernán



2013/12/28 dmacq <[hidden email]>
What I posted before just gets the name of the process, not the name of the
method that is currently executing.  I don't know how to do that off the top
of my head, but I will look into it this weekend.

Suggestions welcome.

Donald [|]



--
View this message in context: http://forum.world.st/Is-someone-working-with-Log4s-tp4732633p4732811.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.


Reply | Threaded
Open this post in threaded view
|

Re: Is someone working with Log4s?

hernanmd
In reply to this post by jtuchel
Yes. I just posted because he could be on vacations time and didn't wanted to wait :)
Thanks,

Hernán


2013/12/27 [hidden email] <[hidden email]>
#currentClassAndMethod is VAST specific. It was added to VAST for log4s, afaik.
I am quite sure Donald is interested in hearing about your problems with it. Did you contact him just the other day or some time ago?

Joachim

Am 27.12.13 10:53, schrieb Hernán Morales Durand:

Because there is a missing method (#currentClassAndMethod) and author didn't replied. Maybe I am using it wrong

EsLogManager runForever: '[log4s]
debugEnabled=''true''
quietMode=''false''
globalLevel=''All''
;runForever=()
;runForever=''75'', ''7''
dailyRollingFileAppender=''TestDailyRollingFileAppender'', ''root'', ''dallyRollingFileTopOfDay.log'',  ''false'', ''All'', '''', ''%-15d [dailyRollingFileAppenderTopOfDay] %-16m'', ''true'',  ''topOfDay''
'

Cheers,

Hernán



--
-----------------------------------------------------------------------
Objektfabrik Joachim Tuchel          mailto:[hidden email]
Fliederweg 1                         http://www.objektfabrik.de
D-71640 Ludwigsburg                  http://joachimtuchel.wordpress.com
Telefon: +49 7141 56 10 86 0         Fax: +49 7141 56 10 86 1



Reply | Threaded
Open this post in threaded view
|

Re: Is someone working with Log4s?

hernanmd
In reply to this post by hernanmd
Actually, locationInfo could be directly thisContext as used by the log facilities methods:

EsLogManagerClass class>>logEvents

    ....
    index := (Time now asMilliSeconds rem: 6) + 1. "pseudo random number"
    message := messages at: index. "pick a random message"
    locationInfo := thisContext.
    ....







2013/12/28 Hernán Morales Durand <[hidden email]>
Do not have a copy of VAST or VisualSmalltalk now but this could make it:

currentClassAndMethod

        ^Association
                key: self class name asString
                value: thisContext method selector


Hernán



2013/12/28 dmacq <[hidden email]>
What I posted before just gets the name of the process, not the name of the
method that is currently executing.  I don't know how to do that off the top
of my head, but I will look into it this weekend.

Suggestions welcome.

Donald [|]



--
View this message in context: http://forum.world.st/Is-someone-working-with-Log4s-tp4732633p4732811.html
Sent from the Pharo Smalltalk Users mailing list archive at Nabble.com.



Reply | Threaded
Open this post in threaded view
|

Re: Is someone working with Log4s?

dmacq
I would add asString like this:

currentClassAndMethod

        ^Association
                key: self class name asString
                value: thisContext method selector asString

But yes that is correct.

Thanks, Hernan.

Donald [|]