You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
subject variable is optional, it gives extra info to the logging function so you can identify and filter out or mark with color certain lines. It gives you more flexibility than logging levels traditionally do. If you'd like to imitate traditional logging levels you could do the following:
namespace app
Log.AddOutput DEBUG DEBUG
Log.AddOutput INFO INFO
Log.AddOutput WARN WARN
subject=DEBUG Log "Debugging"
subject=INFO Log "Done"
subject=WARN Log "Problem!"
...and so on. But you can do much more advanced things too, like filter by namespace or even specific function:
namespace app
# when logging with subject "test1" inside of namespace app use DEBUG:
Log.AddOutput app/test1 DEBUG
Log.AddOutput app/someFunction INFO
# will log "Debugging" to DEBUG
subject=test1 Log "Debugging"
# will log everything within below function to INFO
someFunction() {
Log "Done"
}
I thought this should work:
but it logs at the defaut level (DEBUG) instead of INFO.
The text was updated successfully, but these errors were encountered: