Joost

Not sure that you need a stream - if each line is <32k then you could
do something like this

Class Logger (Extends %RegisteredObject)

classmethod writeLine(inText)
{
  set ^Logger($i(^Logger))=inText

}

of if you want it shared between namespaces make it ^%zLogger
or map ^Logger to a separate common namespace

and then in the %OnAfterSave() or whatever

set txt=..%ClassName(1)_" ID="_..%Id()_" Saved at "_$h
do ##class(Logger).writeLine(txt)

will this do??

Peter



On Fri, 30 Jul 2004 15:59:50 +0200, "Joost Verhoog"
<j.verhoog.AT.saltro.nl> wrote:

>I'd like to have one unique stream to write to. I could make a ClassMethod
>Write(data As %String), but then I need a ClassProperty out As
>%AbstractStream or something to write to. A global variable (= unique, and
>available in every object) would do the trick, too.
>
>How can I specify something like that?
>
>For more information: This is the Singleton programming pattern, see
>http://www.campusprogram.com/reference/en/wikipedia/s/si/singleton_pattern.html
>
>Joost
>


Reply via email to