[Gambas-user] gb.logging Logger bug or wrong doc?
T Lee Davidson
t.lee.davidson at gmail.com
Thu Dec 16 19:30:24 CET 2021
On 12/16/21 6:43 AM, Cristiano Guadagnino wrote:
> This page <https://gambaswiki.org/wiki/comp/gb.logging/logger/_new> says that if sOutput is not specified then log messages are
> sent to stdout.
>
> However, if I instantiate the class this way:
>
> hLogger = New Logger(LogLvl, LogFormat)
>
> where LogLvl = Log.Error and LogFormat = Log.DefaultFormat, I always get the error "Log file not writable" when I execute
> hLogger.Begin.
>
> On the other hand, if I explicitly do
>
> hLogger = New Logger(LogLvl, LogFormat, ":stdout")
>
> then hLogger.Begin works as expected.
It appears to be a bug.
All the parameters to the Logger object's '_new' method are optional. However, the default value for sOutput is not defined.
[Line 22 at https://gitlab.com/gambas/gambas/-/blob/master/comp/src/gb.logging/.src/Logger.class]
--
Lee
More information about the User
mailing list