[Gambas-user] an y example of usage gb.logging ? wiki does not have any example

Sebastian Kulesz sebikul at ...626...
Tue Dec 15 00:37:59 CET 2015


Glad it was useful!

I'm from Argentina, so it's no problem translating my emails. I was doing
it just in case.

Anyways, the time you don't spend writing an email correctly, is time we,
the rest of the list, have to spend trying to decipher it to gasp what you
were trying to say. We are all trying to help, so try to write correctly,
and double check your emails! I value my time just as much as you value
yours.
Besides, most of the people here are not native English speakers, so trying
to read in a foreign language something which is not well written can be
extremely hard or confusing!

And lastly, this list can be used as documentation just as the wiki. So if
someone finds a thread where a problem was solved, it would be nice for the
thread to be easy to read and follow, so as to get to the solution. You say
the wiki can be confusing, imagine coming from Google, with a problem not
mentioned in the wiki, and trying to find the solution in this thread!

On Mon, Dec 14, 2015, 20:24 PICCORO McKAY Lenz <mckaygerhard at ...626...>
wrote:

> thanks Sebastian, for example.. i now revised..  in the svn was
> looking a bit lost
>
> that's the part interest me:
>
> Dim cLogger As Logger
> cLogger = New Logger(LogLevel.Error, Null, Logger.Stdout)
>   cLogger.Begin()
>   cLogger.Log("Using the old logger interface", LogLevel.Critical)
>
> thanks,
>
> If you're not a native user of Spanish language, you do not need me
> translate it,
>
> I write the English bad because I do always in a hurry, my job is to
> do things that are not implemented in linux to made possible
> migrations, including documentation for groups of manpowers, if this
> work is not done in a short time, it is performed on another platform
> (obviously that not like me jejeje)
> Lenz McKAY Gerardo (PICCORO)
> http://qgqlochekone.blogspot.com
>
>
> 2015-12-14 18:18 GMT-04:30 Sebastian Kulesz <sebikul at ...626...>:
> > English here, Spanish translation is below!
> >
> > Here [0] is a little example which is available within the component.
> > Otherwise, if you really just want to output text to the console, you can
> > call Logger("This will be logged to the standard output"), or Logger.Log
> > which is a mirror of the previous function, but longer.
> >
> > In the example, you can see that by using a simple Logger, the text goes
> > only to one output. But by using a ComplexLogger, you can multiplex that
> > output, and even set different levels for each output. So, for example,
> all
> > messages will be saved to a file, by using a FileHandler with
> > a Debug priority, but only messages with Error or Critical priority will
> be
> > shown in the console, by using a ConsoleHandler with an Error priority.
> You
> > can even write your own handler to send the messages over the net to a
> > logging server!
> >
> > --
> >
> > Aquí [0] puedes ver un pequeño ejemplo que esta disponible dentro del
> > código fuente del componente. Si lo único que quieres es imprimir texto
> en
> > la consola, puedes llamar a Logger("Esto se va a imprimir en la
> consola") o
> > a Logger.Log, que es un espejo de la misma función, pero con una llamada
> > mas larga.
> >
> > En el ejemplo, puedes ver que usando un Logger simple, el texto solo va a
> > un lugar. Pero usando un ComplexLogger, puedes multiplexar la salida, y
> > setear distintas prioridades a cada salida. De esta manera, por ejemplo,
> > todos los mensajes pueden ser guardados en un archivo usando un
> FileHandler
> > con la prioridad seteada en Debug, pero que solo lo mensajes con
> > prioridades Error o Critical sean mostrados en la consola, usando un
> > ConsoleHandler con la prioridad seteada en Error. Puedes incluso escribir
> > tus propios Handlers para enviar los mensajes por la red a un servidor de
> > logging!
> >
> > [0]
> >
> http://sourceforge.net/p/gambas/code/HEAD/tree/gambas/trunk/comp/src/gb.logging/.src/MTest.module
> >
> > On Mon, Dec 14, 2015 at 4:10 PM, Christof Thalhofer <chrisml at ...3340...
> >
> > wrote:
> >
> >> Am 14.12.2015 um 19:53 schrieb PICCORO McKAY Lenz:
> >> > but this need gambas 3.6, i have gambas 3.1 and 3.5 as maximun due i
> >> > used debian stable (wheeze)
> >>
> >> Then use Shell and the command logger.
> >>
> >> http://gambaswiki.org/wiki/lang/shell
> >> http://www.cyberciti.biz/tips/howto-linux-unix-write-to-syslog.html
> >>
> >>
> >> Alles Gute
> >>
> >> Christof Thalhofer
> >>
> >> --
> >> Dies ist keine Signatur
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> _______________________________________________
> >> Gambas-user mailing list
> >> Gambas-user at lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/gambas-user
> >>
> >
> ------------------------------------------------------------------------------
> > _______________________________________________
> > Gambas-user mailing list
> > Gambas-user at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
> ------------------------------------------------------------------------------
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
>



More information about the User mailing list