rtapi_set_msg_level(3rtapi)
π NAME π
rtapi_get_msg_level, rtapi_set_msg_level β bestie, this is how you get or set the logging level π
It's living in the RTAPI manual section (that's the 3rtapi vibe, iykyk) β¨
πΈ SYNTAX πΈ
int rtapi_set_msg_level(int level)
int rtapi_get_msg_level()
Two little functions, one big glow-up for your logs. π
π¦ ARGUMENTS π¦
levelβ the logging level you're manifesting β¨ like, the one you desire π«Ά
π DESCRIPTION π
Okay so, this pair gets or sets the RTAPI message level that rtapi_print_msg uses. That's the whole job. π
And here's the tea π: depending on the RTOS, that level might apply to just one single RTAPI module, or it might apply to a whole group of modules. So no cap β scope is RTOS-dependent, and that's just how it is, bestie π
π REALTIME CONSIDERATIONS π
The vibe check here is very permissive, periodt:
- may be called from non-realtime code β
- may be called from init/cleanup code β
- may be called from realtime code β
All three. Iconic. π§
β RETURN VALUE β
rtapi_set_msg_levelreturns a status code π«rtapi_get_msg_levelreturns the current level π
And here's the level ladder, memorize it fr fr:
RTAPI_MSG_NONE=0RTAPI_MSG_ERR=1RTAPI_MSG_WARN=2RTAPI_MSG_INFO=3RTAPI_MSG_DBG=4RTAPI_MSG_ALL=5
Zero to five, quiet to loud, the whole spectrum bestie π
Not me putting the numbers in a bullet list because there's literally no table allowed π but every single one is there, don't worry π«Ά
π SEE ALSO π
rtapi_print_msg(3rtapi) β the function that actually uses this level, go read it next π₯
Mwah π that's the whole page! Written up by the LinuxCNC Documentation girlies, dated 2006-10-12, and yeah she's been serving since then πβ¨
π¦ where this page comes from
- debian trixie: linuxcnc-uspace-dev 1:2.9.4-2+deb13u1 Β· GFDL-1.1-or-later
- ubuntu questing: linuxcnc-uspace-dev 1:2.9.4-2ubuntu2
- ubuntu resolute: linuxcnc-uspace-dev 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- ubuntu stonking: linuxcnc-uspace-dev 1:2.9.4-2ubuntu4 Β· GFDL-1.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms