Skip to content

Berry add loglevel to mqtt.publish()#24551

Merged
s-hadinger merged 1 commit intoarendst:developmentfrom
s-hadinger:berry_mqtt_publish_loglevel
Mar 14, 2026
Merged

Berry add loglevel to mqtt.publish()#24551
s-hadinger merged 1 commit intoarendst:developmentfrom
s-hadinger:berry_mqtt_publish_loglevel

Conversation

@s-hadinger
Copy link
Copy Markdown
Collaborator

Description:

Berry add an optional loglevel to mqtt.publish() to select the loglevel per message, instead of the default LOG_LEVEL_INFO(2). Setting 0 disables logging at all.

mqtt.publish(topic, payload [, retain:bool, start:int, len:int, loglevel:int]) -> nil

Since loglevel is the last optional argument, you can pass nil to the previous optional argument to ignore them and set the default valude, ex: mqtt.publish('{"k":"Testpayload"}', "/my/topic", nil, nil, nil, 0)

Follow-up of #21308 and a932b3d

Checklist:

  • The pull request is done against the latest development branch
  • Only relevant files were touched
  • Only one feature/fix was added per PR and the code change compiles without warnings
  • The code change is tested and works with Tasmota core ESP8266 V.2.7.8
  • The code change is tested and works with Tasmota core ESP32 V.3.1.10
  • I accept the CLA.

NOTE: The code change must pass CI tests. Your PR cannot be merged unless tests pass

@s-hadinger s-hadinger merged commit d7c5306 into arendst:development Mar 14, 2026
64 checks passed
josef109 pushed a commit to josef109/Tasmota that referenced this pull request Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant