waldenner / robotframework

Automatically exported from code.google.com/p/robotframework
Apache License 2.0
0 stars 0 forks source link

Expose the current log level as variable #597

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
As a test writer
I would like to have access to the log level value as a builtin variable
So that I could execute keywords depending on the current log level.

${LOGLEVEL} would be a nice name for it.

Original issue reported on code.google.com by kai.hack...@gmail.com on 21 Jul 2010 at 4:30

GoogleCodeExporter commented 9 years ago
Do you have a use case for this?

Have you noticed that `Set Log Level` keyword returns the old log level so you 
can already implement `Get Log Level` as a user keyword:

Get Log Level
    ${level} =  Set Log Level  INFO
    Set Log Level  ${level}
    [Return]  ${level}

We could easily add `Get Log Level` to BuiltIn library too, and that would be a 
lot easier than adding a dynamically changing variable. Would that be enough?

Original comment by pekka.klarck on 21 Jul 2010 at 6:23

GoogleCodeExporter commented 9 years ago
Somehow I have missed this keyword before.

Original comment by kai.hack...@gmail.com on 21 Jul 2010 at 8:33

GoogleCodeExporter commented 9 years ago
Would `Get Log Level` in BuiltIn be useful?

Original comment by pekka.klarck on 22 Jul 2010 at 8:18

GoogleCodeExporter commented 9 years ago
Apparently the current functionality is enough.

Original comment by pekka.klarck on 30 Aug 2010 at 3:11